Commit 019a04bf by qwmqiuwenmin

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

parents 29b41e41 31c39fd3
......@@ -24,4 +24,5 @@ public interface AuditApiService {
List<AuditDTO> listByStoreId(String storeId);
AuditDTO findByStoreIdAndChangeField(String storeId,String changeField);
}
package com.gic.haoban.manage.web.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.DictDTO;
import com.gic.haoban.manage.api.service.DictApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
@RestController
public class DictController extends WebBaseController{
private static final String LOGIN_URL = "/haoban-manage3-web/yw-login";
private static Logger logger = LoggerFactory.getLogger(DictController.class);
@Autowired
private DictApiService dictApiService;
//获取字典列表
@RequestMapping("get-dict-list")
public HaobanResponse getDictList(BasePageInfo pageInfo) {
Page<DictDTO> page = dictApiService.pageList(pageInfo);
return resultResponse(HaoBanErrCode.ERR_1,page);
}
//保存字典
@RequestMapping("save-dict")
public HaobanResponse saveDict(DictDTO dto) {
dictApiService.saveDict(dto);
return resultResponse(HaoBanErrCode.ERR_1);
}
//查看字典详情
@RequestMapping("find-dict-detail")
public HaobanResponse findDictDetail(String dictId) {
DictDTO dictDTO = dictApiService.findOneDict(dictId);
return resultResponse(HaoBanErrCode.ERR_1,dictDTO);
}
//删除字典
@RequestMapping("del-dict")
public HaobanResponse deleteDict(String dictId) {
dictApiService.deleteOne(dictId);
return resultResponse(HaoBanErrCode.ERR_1);
}
}
......@@ -23,17 +23,17 @@
<dubbo:reference interface="com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService" id="wxEnterpriseRelatedApiService" />
<dubbo:reference interface="com.gic.haoban.manage.api.service.ApplicationApiService" id="applicationApiService"/>
<dubbo:reference interface="com.gic.haoban.manage.api.service.WxEnterpriseApiService" id="wxEnterpriseApiService"/>
<dubbo:reference interface="com.gic.enterprise.api.service.EnterpriseService" id="enterpriseService"/>
<dubbo:reference interface="com.gic.enterprise.api.service.StoreService" id="storeService"/>
<dubbo:reference interface="com.gic.enterprise.api.service.DepartmentService" id="departmentService"/>
<dubbo:reference interface="com.gic.haoban.manage.api.service.DepartmentApiService" id="departmentApiService"/>
<dubbo:reference interface="com.gic.enterprise.api.service.StoreGroupService" id="storeGroupService"/>
<dubbo:reference interface="com.gic.clerk.api.service.ClerkService" id="clerkService"/>
<dubbo:reference interface="com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService" id="staffDepartmentRelatedApiService"/>
<dubbo:reference interface="com.gic.haoban.manage.api.service.DictApiService" id="dictApiService"/>
</beans>
......@@ -21,4 +21,6 @@ public interface TabHaobanAuditMapper {
Page<TabHaobanAudit> page(Integer auditType, List<String> storeIds,List<String>staffIds,String wxEnterpriseId, String enterpriseId,Integer auditStatus );
List<TabHaobanAudit> listByStoreId(String storeId);
TabHaobanAudit findByStoreIdAndChangeField(String storeId,String changeField);
}
\ No newline at end of file
......@@ -194,4 +194,13 @@ public class AuditApiServiceImpl implements AuditApiService{
List<AuditDTO> resultList = EntityUtil.changeEntityListByJSON(AuditDTO.class, list);
return resultList;
}
@Override
public AuditDTO findByStoreIdAndChangeField(String storeId,
String changeField) {
TabHaobanAudit tab = auditMapper.findByStoreIdAndChangeField(storeId,changeField);
if(tab == null){
return null;
}
return EntityUtil.changeEntityByJSON(AuditDTO.class, tab);
}
}
......@@ -304,5 +304,14 @@
and commit_store_id = #{storeId,jdbcType=VARCHAR}
and audit_status = 0
</select>
<select id="findByStoreIdAndChangeField" 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
and change_field = #{changeField,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
......@@ -252,7 +252,13 @@ public class StoreController extends WebBaseController{
if(auditFlag == 1){
//要审核
logger.info("==================11111");
int i = auditApiService.save(1,wxEnterpriseId, enterpriseId, staffId, storeId, changeField, oldValue, newValue);
AuditDTO auditDTO = auditApiService.findByStoreIdAndChangeField(storeId, changeField);
if(auditDTO == null){
//为空,可继续提交审核
int i = auditApiService.save(1,wxEnterpriseId, enterpriseId, staffId, storeId, changeField, oldValue, newValue);
}else{
return resultResponse(HaoBanErrCode.ERR_400018);
}
}else{
logger.info("==================22222");
auditApiService.editStoreInfo(storeId, changeField, oldValue, newValue);
......
......@@ -89,6 +89,7 @@ public enum HaoBanErrCode {
ERR_400015(400015, "数据为空"),
ERR_400016(400016, "提交人不存在"),
ERR_400017(400017, "成员不存在"),
ERR_400018(400018, "已有待审核的门店字段信息提交,请等待审核完再提交"),
/**
* 文件不存在
......
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