Commit ab32a6cb by huangZW

111

parent d35154bc
...@@ -38,4 +38,6 @@ public interface AuditApiService { ...@@ -38,4 +38,6 @@ public interface AuditApiService {
void update(AuditDTO audit); void update(AuditDTO audit);
List<BatchAuditLogDTO> listBatchLog(String batchId); List<BatchAuditLogDTO> listBatchLog(String batchId);
AuditDTO findByBindRelatedIdAndAuditType(String relatedId,int auditType);
} }
...@@ -32,4 +32,7 @@ public interface TabHaobanAuditMapper { ...@@ -32,4 +32,7 @@ public interface TabHaobanAuditMapper {
com.github.pagehelper.Page listByStaffId(@Param("staffId")String staffId,@Param("auditType")Integer auditType,@Param("auditStatus")Integer auditStatus); com.github.pagehelper.Page listByStaffId(@Param("staffId")String staffId,@Param("auditType")Integer auditType,@Param("auditStatus")Integer auditStatus);
com.github.pagehelper.Page pageStoreListByParams(@Param("storeId")String storeId, @Param("auditType")Integer auditType, @Param("auditStatus")Integer auditStatus); com.github.pagehelper.Page pageStoreListByParams(@Param("storeId")String storeId, @Param("auditType")Integer auditType, @Param("auditStatus")Integer auditStatus);
TabHaobanAudit findByBindRelatedIdAndAuditType(@Param("relatedId")String relatedId,@Param("auditType")int auditType);
} }
\ No newline at end of file
...@@ -242,11 +242,11 @@ public class AuditApiServiceImpl implements AuditApiService{ ...@@ -242,11 +242,11 @@ public class AuditApiServiceImpl implements AuditApiService{
String storeId = tab2.getCommitStoreId(); String storeId = tab2.getCommitStoreId();
this.sendMessageByStaffId(staffId, storeId, title, content); this.sendMessageByStaffId(staffId, storeId, title, content);
}else if(auditType == AuditType.CLERK_BIND.getCode()){ }else if(auditType == AuditType.CLERK_BIND.getCode()){
staffDepartmentRelatedApiService.sendClerkBind(obj.getClerkId(), obj.getClerkCode(), 1, ""); staffDepartmentRelatedApiService.sendClerkBind(obj.getClerkId(), obj.getClerkCode(), 2, auditReason);
}else if(auditType == AuditType.CLERK_ADD.getCode()) { }else if(auditType == AuditType.CLERK_ADD.getCode()) {
staffDepartmentRelatedApiService.sendClerkAdd(obj.getClerkId(), obj.getClerkCode(), 1, ""); staffDepartmentRelatedApiService.sendClerkAdd(obj.getClerkId(), obj.getClerkCode(), 2, auditReason);
}else if(auditType == AuditType.CLERK_DEL.getCode()) { }else if(auditType == AuditType.CLERK_DEL.getCode()) {
staffDepartmentRelatedApiService.sendClerkDel(obj.getClerkId(), obj.getClerkCode(), 1, ""); staffDepartmentRelatedApiService.sendClerkDel(obj.getClerkId(), obj.getClerkCode(), 2, auditReason);
} }
} }
@Override @Override
...@@ -461,5 +461,11 @@ public class AuditApiServiceImpl implements AuditApiService{ ...@@ -461,5 +461,11 @@ public class AuditApiServiceImpl implements AuditApiService{
List<TabHaobanBatchAuditLog > list = tabHaobanBatchAuditLogMapper.listByBatchId(batchId); List<TabHaobanBatchAuditLog > list = tabHaobanBatchAuditLogMapper.listByBatchId(batchId);
return EntityUtil.changeEntityListByJSON(BatchAuditLogDTO.class, list); return EntityUtil.changeEntityListByJSON(BatchAuditLogDTO.class, list);
} }
@Override
public AuditDTO findByBindRelatedIdAndAuditType(String relatedId,
int auditType) {
TabHaobanAudit tab = auditMapper.findByBindRelatedIdAndAuditType(relatedId, auditType);
return EntityUtil.changeEntityByJSON(AuditDTO.class, tab);
}
} }
...@@ -404,4 +404,16 @@ ...@@ -404,4 +404,16 @@
order by create_time desc order by create_time desc
</select> </select>
<select id="findByBindRelatedIdAndAuditType" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List" />
from tab_haoban_audit
where 1=1
and status_flag = 1
and related_Id = #{relatedId}
and audit_type = #{auditType}
and audit_status = 0
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -46,6 +46,7 @@ import com.gic.haoban.manage.api.dto.StaffDTO; ...@@ -46,6 +46,7 @@ import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO; import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseDTO; import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.api.enums.AppPageType; import com.gic.haoban.manage.api.enums.AppPageType;
import com.gic.haoban.manage.api.enums.AuditType;
import com.gic.haoban.manage.api.service.AuditApiService; import com.gic.haoban.manage.api.service.AuditApiService;
import com.gic.haoban.manage.api.service.AuditSettingApiService; import com.gic.haoban.manage.api.service.AuditSettingApiService;
import com.gic.haoban.manage.api.service.BindApiService; import com.gic.haoban.manage.api.service.BindApiService;
...@@ -537,6 +538,13 @@ public class ClerkController extends WebBaseController{ ...@@ -537,6 +538,13 @@ public class ClerkController extends WebBaseController{
if(staff == null){ if(staff == null){
return resultResponse(HaoBanErrCode.ERR_10006); return resultResponse(HaoBanErrCode.ERR_10006);
} }
AuditDTO auditDTO = auditApiService.findByBindRelatedIdAndAuditType(clerk.getStoreId(),AuditType.CLERK_BIND.getCode());
if(auditDTO != null){
return resultResponse(HaoBanErrCode.ERR_10018);
}
StoreDTO store = storeService.getStore(clerk.getStoreId()); StoreDTO store = storeService.getStore(clerk.getStoreId());
String clerkCode = clerk.getClerkCode(); String clerkCode = clerk.getClerkCode();
String wxEnterpriseId = staff.getWxEnterpriseId(); String wxEnterpriseId = staff.getWxEnterpriseId();
......
...@@ -205,6 +205,8 @@ public enum HaoBanErrCode { ...@@ -205,6 +205,8 @@ public enum HaoBanErrCode {
ERR_10017(10017,"审核记录不存在"), ERR_10017(10017,"审核记录不存在"),
ERR_10018(10018,"审核记录已存在"),
ERR_999(999, "操作失败"), ERR_999(999, "操作失败"),
ERR_DEFINE(-888, "自定义错误"), ERR_DEFINE(-888, "自定义错误"),
......
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