Commit a42060aa by 墨竹

活码操作日志

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