Commit a42060aa by 墨竹

活码操作日志

parent 7de4e31c
...@@ -101,6 +101,8 @@ public class HmQrcodeQDTO implements Serializable { ...@@ -101,6 +101,8 @@ public class HmQrcodeQDTO implements Serializable {
*/ */
private Integer invokingType = 0; private Integer invokingType = 0;
private String addStaffName;
public Long getHmId() { public Long getHmId() {
return hmId; return hmId;
...@@ -365,5 +367,13 @@ public class HmQrcodeQDTO implements Serializable { ...@@ -365,5 +367,13 @@ public class HmQrcodeQDTO implements Serializable {
public void setInvokingType(Integer invokingType) { public void setInvokingType(Integer invokingType) {
this.invokingType = invokingType; this.invokingType = invokingType;
} }
public String getAddStaffName() {
return addStaffName;
}
public void setAddStaffName(String addStaffName) {
this.addStaffName = addStaffName;
}
} }
...@@ -293,6 +293,8 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -293,6 +293,8 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
} }
setLoggerContext(hmQrcodeQDTO.getEnterpriseId(), wxEnterpriseId, hmQrcodeQDTO.getModifierId(), hmQrcodeQDTO.getModifierName()); setLoggerContext(hmQrcodeQDTO.getEnterpriseId(), wxEnterpriseId, hmQrcodeQDTO.getModifierId(), hmQrcodeQDTO.getModifierName());
//操作日志
updateSystemLog(hmQrcodeQDTO, hmId); updateSystemLog(hmQrcodeQDTO, hmId);
int updateResult = hmQrcodeService.update(hmQrcodeQDTO); int updateResult = hmQrcodeService.update(hmQrcodeQDTO);
...@@ -329,11 +331,22 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -329,11 +331,22 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
logContent.append("活码分组「").append(hmGroupSettingBOOld.getGroupName()).append("」").append("变更为「").append(hmGroupSettingBO.getGroupName()).append("」"); logContent.append("活码分组「").append(hmGroupSettingBOOld.getGroupName()).append("」").append("变更为「").append(hmGroupSettingBO.getGroupName()).append("」");
} }
//员工变更 //员工变更
String staffId = hmQrcodeQDTO.getStaffId(); List<String> clerkIdList = hmQrcodeQDTO.getClerkIdList();
String staffIdOld = hmOld.getStaffId(); List<HmClerkRelationBO> hmClerkRelationBOS = hmClerkRelationService.queryByHmIdNotInClerkIds(hmId, clerkIdList);
if (!staffId.equals(staffIdOld)) { if (CollectionUtils.isNotEmpty(hmClerkRelationBOS)) {
logContent.append("新增使用成员「").append(hmQrcodeQDTO.getStaffName()).append("」").append("删除使用成员「").append(hmOld.getStaffName()).append("」"); //删除员工
StringBuffer staffNameBuffer = new StringBuffer();
for (HmClerkRelationBO hmClerkRelationBO : hmClerkRelationBOS) {
staffNameBuffer.append(hmClerkRelationBO.getStaffName()).append(" ");
}
logContent.append("删除使用成员「").append(staffNameBuffer.toString()).append("」");
}
//新增员工
String addStaffName = hmQrcodeQDTO.getAddStaffName();
if (StringUtils.isNotBlank(addStaffName)) {
logContent.append("新增使用成员「").append(addStaffName).append("」");
} }
Integer passFlag = hmQrcodeQDTO.getPassFlag(); Integer passFlag = hmQrcodeQDTO.getPassFlag();
Integer passFlagOld = hmOld.getPassFlag(); Integer passFlagOld = hmOld.getPassFlag();
if (!passFlag.equals(passFlagOld)) { if (!passFlag.equals(passFlagOld)) {
...@@ -436,7 +449,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -436,7 +449,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
if (hmType == 2) { if (hmType == 2) {
//多人活码 //多人活码
insertHmClerkRelation(enterpriseId, wxEnterpriseId, hmId, clerkIdList, addFlag); insertHmClerkRelation(hmQrcodeQDTO,enterpriseId, wxEnterpriseId, hmId, clerkIdList, addFlag);
} else if (hmType == 1) { } else if (hmType == 1) {
//单人活码 //单人活码
HmQrcodeBO hmQrcodeBO = hmQrcodeService.queryByClerkId(clerkId, wxEnterpriseId); HmQrcodeBO hmQrcodeBO = hmQrcodeService.queryByClerkId(clerkId, wxEnterpriseId);
...@@ -478,7 +491,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -478,7 +491,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
* @param clerkIdList * @param clerkIdList
* @param addFlag * @param addFlag
*/ */
private void insertHmClerkRelation(String enterpriseId,String wxEnterpriseId, Long hmId, List<String> clerkIdList, Boolean addFlag) { private void insertHmClerkRelation(HmQrcodeQDTO hmQrcodeQDTO,String enterpriseId,String wxEnterpriseId, Long hmId, List<String> clerkIdList, Boolean addFlag) {
Date now = new Date(); Date now = new Date();
if (!addFlag) { if (!addFlag) {
//修改,删除其余无效导购 //修改,删除其余无效导购
...@@ -489,7 +502,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -489,7 +502,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
} }
} }
} }
StringBuffer addStaffName = new StringBuffer();
for (String clerkId : clerkIdList) { for (String clerkId : clerkIdList) {
HmClerkRelationBO hmClerkRelationBO = hmClerkRelationService.queryByHmIdAndClerkId(hmId, clerkId); HmClerkRelationBO hmClerkRelationBO = hmClerkRelationService.queryByHmIdAndClerkId(hmId, clerkId);
if (hmClerkRelationBO != null) { if (hmClerkRelationBO != null) {
...@@ -524,6 +537,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -524,6 +537,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
TabHaobanStaff tabHaobanStaff = staffService.selectById(staffClerkRelationDTO.getStaffId()); TabHaobanStaff tabHaobanStaff = staffService.selectById(staffClerkRelationDTO.getStaffId());
if (tabHaobanStaff != null) { if (tabHaobanStaff != null) {
hmClerkRelationQDTO.setStaffName(tabHaobanStaff.getStaffName()); hmClerkRelationQDTO.setStaffName(tabHaobanStaff.getStaffName());
addStaffName.append(tabHaobanStaff.getStaffName()).append(" ");
} }
} }
hmClerkRelationQDTO.setStatus(1); hmClerkRelationQDTO.setStatus(1);
...@@ -533,6 +547,10 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -533,6 +547,10 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
hmClerkRelationQDTO.setAddNum(0); hmClerkRelationQDTO.setAddNum(0);
hmClerkRelationService.insert(hmClerkRelationQDTO); hmClerkRelationService.insert(hmClerkRelationQDTO);
} }
if (addStaffName != null && addStaffName.length() > 0){
hmQrcodeQDTO.setAddStaffName(addStaffName.toString());
}
} }
......
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