Commit 926c8f02 by qwmqiuwenmin

Merge branch 'developer' of http://115.159.76.241/haoban3.0/haoban-manage3.0.git into developer

parents 14ccb2c8 f100f731
package com.gic.haoban.manage.api.service;
import java.util.List;
import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.manage.api.dto.AuditDTO;
......@@ -16,7 +18,10 @@ public interface AuditApiService {
void refuse(String auditId,String auditReason);
int save(Integer auditType,String enterpriseId,String commitStaffId,String commitStoreId,String changeField,String oldValue,String newValue);
int save(Integer auditType,String wxEnterpriseId,String enterpriseId,String commitStaffId,String commitStoreId,String changeField,String oldValue,String newValue);
void editStoreInfo(String storeId,String changeField,String oldValue, String newValue);
List<AuditDTO> listByStoreId(String storeId);
}
......@@ -19,4 +19,6 @@ public interface TabHaobanAuditMapper {
int updateByPrimaryKey(TabHaobanAudit record);
Page<TabHaobanAudit> page(Integer auditType, List<String> storeIds,List<String>staffIds,String wxEnterpriseId, String enterpriseId,Integer auditStatus );
List<TabHaobanAudit> listByStoreId(String storeId);
}
\ No newline at end of file
......@@ -18,6 +18,7 @@ import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.dto.StorePhotoDTO;
import com.gic.enterprise.api.service.StoreService;
......@@ -98,7 +99,7 @@ public class AuditApiServiceImpl implements AuditApiService{
auditMapper.updateByPrimaryKeySelective(tab);
}
@Override
public int save(Integer auditType, String enterpriseId,
public int save(Integer auditType,String wxEnterpriseId, String enterpriseId,
String commitStaffId, String commitStoreId, String changeField,
String oldValue, String newValue) {
TabHaobanStaff staff = staffMapper.selectByPrimaryKey(commitStaffId);
......@@ -117,6 +118,7 @@ public class AuditApiServiceImpl implements AuditApiService{
tab.setCommitStoreId(commitStoreId);
tab.setCommitTime(new Date());
tab.setCreateTime(new Date());
tab.setWxEnterpriseId(wxEnterpriseId);
tab.setEnterpriseId(enterpriseId);
tab.setNewValue(newValue);
tab.setOldValue(oldValue);
......@@ -186,4 +188,10 @@ public class AuditApiServiceImpl implements AuditApiService{
//门店图片
}
}
@Override
public List<AuditDTO> listByStoreId(String storeId) {
List<TabHaobanAudit> list = auditMapper.listByStoreId(storeId);
List<AuditDTO> resultList = EntityUtil.changeEntityListByJSON(AuditDTO.class, list);
return resultList;
}
}
......@@ -295,5 +295,14 @@
<include refid="storeSql"/>
<include refid="staffSql"/>
</select>
<select id="listByStoreId" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List" />
from tab_haoban_audit
where 1=1
and commit_store_id = #{storeId,jdbcType=VARCHAR}
and audit_status = 0
</select>
</mapper>
\ No newline at end of file
......@@ -34,6 +34,7 @@ import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.data.api.dto.HaobanDataDTO;
import com.gic.haoban.data.api.service.HaobanDataApiService;
import com.gic.haoban.manage.api.dto.AuditDTO;
import com.gic.haoban.manage.api.dto.AuditSettingDTO;
import com.gic.haoban.manage.api.dto.DepartmentDTO;
import com.gic.haoban.manage.api.dto.EnterpriseDetailDTO;
......@@ -251,7 +252,7 @@ public class StoreController extends WebBaseController{
if(auditFlag == 1){
//要审核
logger.info("==================11111");
int i = auditApiService.save(1, enterpriseId, staffId, storeId, changeField, oldValue, newValue);
int i = auditApiService.save(1,wxEnterpriseId, enterpriseId, staffId, storeId, changeField, oldValue, newValue);
}else{
logger.info("==================22222");
auditApiService.editStoreInfo(storeId, changeField, oldValue, newValue);
......@@ -265,6 +266,7 @@ public class StoreController extends WebBaseController{
if(StringUtils.isAnyBlank(storeId)){
return resultResponse(HaoBanErrCode.ERR_2);
}
List<AuditDTO> list = auditApiService.listByStoreId(storeId);
List<StorePhotoDTO> imgDTOList = storeService.getStoreImages(storeId);
StoreDTO store = storeService.getStore(storeId);
StoreDetailVO vo = EntityUtil.changeEntity(StoreDetailVO.class, store);
......@@ -284,7 +286,7 @@ public class StoreController extends WebBaseController{
StaffDepartmentRelatedDTO staffDepartmentRelatedDTO = staffDepartmentRelatedApiService.getByStaffDepartmentRelatedId(staffDepartmentRelatedId);
vo.setClerkCode(staffDepartmentRelatedDTO.getClerkCode());
vo.setBindFlag(StringUtils.isEmpty(staffDepartmentRelatedDTO.getClerkCode())?0:1);
vo.setAuditDetail(list);
return resultResponse(HaoBanErrCode.ERR_1,vo);
}
......
......@@ -39,6 +39,16 @@ public class StoreDetailVO implements Serializable {
private Double storeArea;
private String areaId;
private Object auditDetail;
public Object getAuditDetail() {
return auditDetail;
}
public void setAuditDetail(Object auditDetail) {
this.auditDetail = auditDetail;
}
public String getAreaId() {
return areaId;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment