java110-bean/src/main/java/com/java110/dto/complaintType/ComplaintTypeDto.java
@@ -1,8 +1,11 @@ package com.java110.dto.complaintType; import com.java110.dto.PageDto; import com.java110.dto.complaintTypeUser.ComplaintTypeUserDto; import java.io.Serializable; import java.util.Date; import java.util.List; /** * @ClassName FloorDto @@ -15,11 +18,13 @@ public class ComplaintTypeDto extends PageDto implements Serializable { private String typeCd; private String typeName; private String notifyWay; private String remark; private String communityId; private String appraiseReply; private String typeName; private String notifyWay; private String remark; private String communityId; private String appraiseReply; private List<ComplaintTypeUserDto> staffs; private Date createTime; @@ -30,37 +35,48 @@ public String getTypeCd() { return typeCd; } public void setTypeCd(String typeCd) { public void setTypeCd(String typeCd) { this.typeCd = typeCd; } public String getTypeName() { public String getTypeName() { return typeName; } public void setTypeName(String typeName) { public void setTypeName(String typeName) { this.typeName = typeName; } public String getNotifyWay() { public String getNotifyWay() { return notifyWay; } public void setNotifyWay(String notifyWay) { public void setNotifyWay(String notifyWay) { this.notifyWay = notifyWay; } public String getRemark() { public String getRemark() { return remark; } public void setRemark(String remark) { public void setRemark(String remark) { this.remark = remark; } public String getCommunityId() { public String getCommunityId() { return communityId; } public void setCommunityId(String communityId) { public void setCommunityId(String communityId) { this.communityId = communityId; } public String getAppraiseReply() { public String getAppraiseReply() { return appraiseReply; } public void setAppraiseReply(String appraiseReply) { public void setAppraiseReply(String appraiseReply) { this.appraiseReply = appraiseReply; } @@ -80,4 +96,12 @@ public void setStatusCd(String statusCd) { this.statusCd = statusCd; } public List<ComplaintTypeUserDto> getStaffs() { return staffs; } public void setStaffs(List<ComplaintTypeUserDto> staffs) { this.staffs = staffs; } } java110-bean/src/main/java/com/java110/dto/complaintTypeUser/ComplaintTypeUserDto.java
@@ -1,6 +1,7 @@ package com.java110.dto.complaintTypeUser; import com.java110.dto.PageDto; import java.io.Serializable; import java.util.Date; @@ -15,10 +16,11 @@ public class ComplaintTypeUserDto extends PageDto implements Serializable { private String typeCd; private String typeUserId; private String staffName; private String communityId; private String staffId; private String[] typeCds; private String typeUserId; private String staffName; private String communityId; private String staffId; private Date createTime; @@ -29,31 +31,40 @@ public String getTypeCd() { return typeCd; } public void setTypeCd(String typeCd) { public void setTypeCd(String typeCd) { this.typeCd = typeCd; } public String getTypeUserId() { public String getTypeUserId() { return typeUserId; } public void setTypeUserId(String typeUserId) { public void setTypeUserId(String typeUserId) { this.typeUserId = typeUserId; } public String getStaffName() { public String getStaffName() { return staffName; } public void setStaffName(String staffName) { public void setStaffName(String staffName) { this.staffName = staffName; } public String getCommunityId() { public String getCommunityId() { return communityId; } public void setCommunityId(String communityId) { public void setCommunityId(String communityId) { this.communityId = communityId; } public String getStaffId() { public String getStaffId() { return staffId; } public void setStaffId(String staffId) { public void setStaffId(String staffId) { this.staffId = staffId; } @@ -73,4 +84,12 @@ public void setStatusCd(String statusCd) { this.statusCd = statusCd; } public String[] getTypeCds() { return typeCds; } public void setTypeCds(String[] typeCds) { this.typeCds = typeCds; } } java110-db/src/main/resources/mapper/store/ComplaintTypeUserV1ServiceDaoImplMapper.xml
@@ -5,102 +5,113 @@ <mapper namespace="complaintTypeUserV1ServiceDaoImpl"> <!-- 保存投诉类型员工信息 add by wuxw 2018-07-03 --> <insert id="saveComplaintTypeUserInfo" parameterType="Map"> insert into complaint_type_user( type_cd,type_user_id,staff_name,community_id,staff_id ) values ( #{typeCd},#{typeUserId},#{staffName},#{communityId},#{staffId} ) type_cd,type_user_id,staff_name,community_id,staff_id ) values ( #{typeCd},#{typeUserId},#{staffName},#{communityId},#{staffId} ) </insert> <!-- 查询投诉类型员工信息 add by wuxw 2018-07-03 --> <select id="getComplaintTypeUserInfo" parameterType="Map" resultType="Map"> select t.type_cd,t.type_cd typeCd,t.type_user_id,t.type_user_id typeUserId,t.staff_name,t.staff_name staffName,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.staff_id,t.staff_id staffId from complaint_type_user t where 1 =1 <if test="typeCd !=null and typeCd != ''"> and t.type_cd= #{typeCd} </if> <if test="typeUserId !=null and typeUserId != ''"> and t.type_user_id= #{typeUserId} </if> <if test="staffName !=null and staffName != ''"> and t.staff_name= #{staffName} </if> <if test="statusCd !=null and statusCd != ''"> and t.status_cd= #{statusCd} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="staffId !=null and staffId != ''"> and t.staff_id= #{staffId} </if> order by t.create_time desc <if test="page != -1 and page != null "> limit #{page}, #{row} </if> select t.type_cd,t.type_cd typeCd,t.type_user_id,t.type_user_id typeUserId,t.staff_name,t.staff_name staffName,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.staff_id,t.staff_id staffId from complaint_type_user t where 1 =1 <if test="typeCd !=null and typeCd != ''"> and t.type_cd= #{typeCd} </if> <if test="typeCds !=null "> and t.type_cd in <foreach collection="typeCds" item="item" open="(" close=")" separator=","> #{item} </foreach> </if> <if test="typeUserId !=null and typeUserId != ''"> and t.type_user_id= #{typeUserId} </if> <if test="staffName !=null and staffName != ''"> and t.staff_name= #{staffName} </if> <if test="statusCd !=null and statusCd != ''"> and t.status_cd= #{statusCd} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="staffId !=null and staffId != ''"> and t.staff_id= #{staffId} </if> order by t.create_time desc <if test="page != -1 and page != null "> limit #{page}, #{row} </if> </select> <!-- 修改投诉类型员工信息 add by wuxw 2018-07-03 --> <update id="updateComplaintTypeUserInfo" parameterType="Map"> update complaint_type_user t set t.status_cd = #{statusCd} <if test="newBId != null and newBId != ''"> ,t.b_id = #{newBId} </if> <if test="typeCd !=null and typeCd != ''"> , t.type_cd= #{typeCd} </if> <if test="staffName !=null and staffName != ''"> , t.staff_name= #{staffName} </if> <if test="communityId !=null and communityId != ''"> , t.community_id= #{communityId} </if> <if test="staffId !=null and staffId != ''"> , t.staff_id= #{staffId} </if> where 1=1 <if test="typeUserId !=null and typeUserId != ''"> and t.type_user_id= #{typeUserId} </if> update complaint_type_user t set t.status_cd = #{statusCd} <if test="newBId != null and newBId != ''"> ,t.b_id = #{newBId} </if> <if test="staffName !=null and staffName != ''"> , t.staff_name= #{staffName} </if> <if test="staffId !=null and staffId != ''"> , t.staff_id= #{staffId} </if> where 1=1 <if test="typeUserId !=null and typeUserId != ''"> and t.type_user_id= #{typeUserId} </if> <if test="typeCd !=null and typeCd != ''"> and t.type_cd= #{typeCd} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> </update> <!-- 查询投诉类型员工数量 add by wuxw 2018-07-03 --> <select id="queryComplaintTypeUsersCount" parameterType="Map" resultType="Map"> select count(1) count from complaint_type_user t where 1 =1 <if test="typeCd !=null and typeCd != ''"> and t.type_cd= #{typeCd} </if> <if test="typeUserId !=null and typeUserId != ''"> and t.type_user_id= #{typeUserId} </if> <if test="staffName !=null and staffName != ''"> and t.staff_name= #{staffName} </if> <if test="statusCd !=null and statusCd != ''"> and t.status_cd= #{statusCd} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="staffId !=null and staffId != ''"> and t.staff_id= #{staffId} </if> <select id="queryComplaintTypeUsersCount" parameterType="Map" resultType="Map"> select count(1) count from complaint_type_user t where 1 =1 <if test="typeCd !=null and typeCd != ''"> and t.type_cd= #{typeCd} </if> <if test="typeCds !=null "> and t.type_cd in <foreach collection="typeCds" item="item" open="(" close=")" separator=","> #{item} </foreach> </if> <if test="typeUserId !=null and typeUserId != ''"> and t.type_user_id= #{typeUserId} </if> <if test="staffName !=null and staffName != ''"> and t.staff_name= #{staffName} </if> <if test="statusCd !=null and statusCd != ''"> and t.status_cd= #{statusCd} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="staffId !=null and staffId != ''"> and t.staff_id= #{staffId} </if> </select> </select> </mapper> java110-db/src/main/resources/mapper/store/ComplaintTypeV1ServiceDaoImplMapper.xml
@@ -19,7 +19,7 @@ <select id="getComplaintTypeInfo" parameterType="Map" resultType="Map"> select t.type_cd,t.type_cd typeCd,t.type_name,t.type_name typeName,t.notify_way,t.notify_way notifyWay,t.remark,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.appraise_reply,t.appraise_reply appraiseReply communityId,t.appraise_reply,t.appraise_reply appraiseReply,t.create_time createTime from complaint_type t where 1 =1 <if test="typeCd !=null and typeCd != ''"> @@ -66,9 +66,7 @@ <if test="remark !=null and remark != ''"> , t.remark= #{remark} </if> <if test="communityId !=null and communityId != ''"> , t.community_id= #{communityId} </if> <if test="appraiseReply !=null and appraiseReply != ''"> , t.appraise_reply= #{appraiseReply} </if> @@ -76,6 +74,9 @@ <if test="typeCd !=null and typeCd != ''"> and t.type_cd= #{typeCd} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> </update> service-store/src/main/java/com/java110/store/cmd/complaintType/DeleteComplaintTypeCmd.java
@@ -21,8 +21,10 @@ import com.java110.core.context.ICmdDataFlowContext; import com.java110.core.event.cmd.Cmd; import com.java110.core.event.cmd.CmdEvent; import com.java110.intf.store.IComplaintTypeUserV1InnerServiceSMO; import com.java110.intf.store.IComplaintTypeV1InnerServiceSMO; import com.java110.po.complaintType.ComplaintTypePo; import com.java110.po.complaintTypeUser.ComplaintTypeUserPo; import com.java110.utils.exception.CmdException; import com.java110.utils.util.Assert; import com.java110.utils.util.BeanConvertUtil; @@ -48,6 +50,9 @@ @Autowired private IComplaintTypeV1InnerServiceSMO complaintTypeV1InnerServiceSMOImpl; @Autowired private IComplaintTypeUserV1InnerServiceSMO complaintTypeUserV1InnerServiceSMOImpl; @Override public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { Assert.hasKeyAndValue(reqJson, "typeCd", "typeCd不能为空"); @@ -66,6 +71,11 @@ throw new CmdException("删除数据失败"); } ComplaintTypeUserPo complaintTypeUserPo = new ComplaintTypeUserPo(); complaintTypeUserPo.setTypeCd(complaintTypePo.getTypeCd()); complaintTypeUserV1InnerServiceSMOImpl.deleteComplaintTypeUser(complaintTypeUserPo); cmdDataFlowContext.setResponseEntity(ResultVo.success()); } } service-store/src/main/java/com/java110/store/cmd/complaintType/ListComplaintTypeCmd.java
@@ -22,16 +22,22 @@ import com.java110.core.event.cmd.Cmd; import com.java110.core.event.cmd.CmdEvent; import com.java110.core.factory.GenerateCodeFactory; import com.java110.dto.complaintTypeUser.ComplaintTypeUserDto; import com.java110.intf.store.IComplaintTypeUserV1InnerServiceSMO; import com.java110.intf.store.IComplaintTypeV1InnerServiceSMO; import com.java110.po.complaintType.ComplaintTypePo; import com.java110.po.complaintTypeUser.ComplaintTypeUserPo; import com.java110.utils.exception.CmdException; import com.java110.utils.util.Assert; import com.java110.utils.util.BeanConvertUtil; import com.java110.utils.util.ListUtil; import com.java110.vo.ResultVo; import org.springframework.beans.factory.annotation.Autowired; import com.java110.dto.complaintType.ComplaintTypeDto; import java.util.List; import java.util.ArrayList; import org.springframework.http.ResponseEntity; import org.springframework.http.HttpStatus; import org.slf4j.Logger; @@ -51,9 +57,13 @@ @Java110Cmd(serviceCode = "complaintType.listComplaintType") public class ListComplaintTypeCmd extends Cmd { private static Logger logger = LoggerFactory.getLogger(ListComplaintTypeCmd.class); private static Logger logger = LoggerFactory.getLogger(ListComplaintTypeCmd.class); @Autowired private IComplaintTypeV1InnerServiceSMO complaintTypeV1InnerServiceSMOImpl; @Autowired private IComplaintTypeUserV1InnerServiceSMO complaintTypeUserV1InnerServiceSMOImpl; @Override public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { @@ -65,22 +75,57 @@ @Override public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { ComplaintTypeDto complaintTypeDto = BeanConvertUtil.covertBean(reqJson, ComplaintTypeDto.class); ComplaintTypeDto complaintTypeDto = BeanConvertUtil.covertBean(reqJson, ComplaintTypeDto.class); int count = complaintTypeV1InnerServiceSMOImpl.queryComplaintTypesCount(complaintTypeDto); int count = complaintTypeV1InnerServiceSMOImpl.queryComplaintTypesCount(complaintTypeDto); List<ComplaintTypeDto> complaintTypeDtos = null; List<ComplaintTypeDto> complaintTypeDtos = null; if (count > 0) { complaintTypeDtos = complaintTypeV1InnerServiceSMOImpl.queryComplaintTypes(complaintTypeDto); } else { complaintTypeDtos = new ArrayList<>(); } if (count > 0) { complaintTypeDtos = complaintTypeV1InnerServiceSMOImpl.queryComplaintTypes(complaintTypeDto); } else { complaintTypeDtos = new ArrayList<>(); } ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, complaintTypeDtos); //todo 查询类型员工 toQueryStaff(complaintTypeDtos); ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, complaintTypeDtos); cmdDataFlowContext.setResponseEntity(responseEntity); ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); cmdDataFlowContext.setResponseEntity(responseEntity); } private void toQueryStaff(List<ComplaintTypeDto> complaintTypeDtos) { if (ListUtil.isNull(complaintTypeDtos)) { return; } List<String> typeCds = new ArrayList<>(); for (ComplaintTypeDto complaintTypeDto : complaintTypeDtos) { typeCds.add(complaintTypeDto.getTypeCd()); } ComplaintTypeUserDto complaintTypeUserDto = new ComplaintTypeUserDto(); complaintTypeUserDto.setTypeCds(typeCds.toArray(new String[typeCds.size()])); List<ComplaintTypeUserDto> complaintTypeUserDtos = complaintTypeUserV1InnerServiceSMOImpl.queryComplaintTypeUsers(complaintTypeUserDto); if (ListUtil.isNull(complaintTypeUserDtos)) { return; } List<ComplaintTypeUserDto> staffs = null; for (ComplaintTypeDto complaintTypeDto : complaintTypeDtos) { staffs = new ArrayList<>(); for(ComplaintTypeUserDto complaintTypeUserDto1 : complaintTypeUserDtos){ if(complaintTypeDto.getTypeCd().equals(complaintTypeUserDto1.getTypeCds())){ staffs.add(complaintTypeUserDto1); } } complaintTypeDto.setStaffs(staffs); } } } service-store/src/main/java/com/java110/store/cmd/complaintType/ListComplaintTypeUserCmd.java
File was renamed from service-store/src/main/java/com/java110/store/cmd/complaintTypeUser/ListComplaintTypeUserCmd.java @@ -13,17 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ package com.java110.store.cmd.complaintTypeUser; package com.java110.store.cmd.complaintType; import com.alibaba.fastjson.JSONObject; import com.java110.core.annotation.Java110Cmd; import com.java110.core.annotation.Java110Transactional; import com.java110.core.context.ICmdDataFlowContext; import com.java110.core.event.cmd.Cmd; import com.java110.core.event.cmd.CmdEvent; import com.java110.core.factory.GenerateCodeFactory; import com.java110.intf.store.IComplaintTypeUserV1InnerServiceSMO; import com.java110.po.complaintTypeUser.ComplaintTypeUserPo; import com.java110.utils.exception.CmdException; import com.java110.utils.util.Assert; import com.java110.utils.util.BeanConvertUtil; @@ -48,7 +45,7 @@ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 */ @Java110Cmd(serviceCode = "complaintTypeUser.listComplaintTypeUser") @Java110Cmd(serviceCode = "complaintType.listComplaintTypeUser") public class ListComplaintTypeUserCmd extends Cmd { private static Logger logger = LoggerFactory.getLogger(ListComplaintTypeUserCmd.class); service-store/src/main/java/com/java110/store/cmd/complaintType/SaveComplaintTypeCmd.java
@@ -15,6 +15,7 @@ */ package com.java110.store.cmd.complaintType; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.java110.core.annotation.Java110Cmd; import com.java110.core.annotation.Java110Transactional; @@ -22,11 +23,14 @@ import com.java110.core.event.cmd.Cmd; import com.java110.core.event.cmd.CmdEvent; import com.java110.core.factory.GenerateCodeFactory; import com.java110.intf.store.IComplaintTypeUserV1InnerServiceSMO; import com.java110.intf.store.IComplaintTypeV1InnerServiceSMO; import com.java110.po.complaintType.ComplaintTypePo; import com.java110.po.complaintTypeUser.ComplaintTypeUserPo; import com.java110.utils.exception.CmdException; import com.java110.utils.util.Assert; import com.java110.utils.util.BeanConvertUtil; import com.java110.utils.util.ListUtil; import com.java110.vo.ResultVo; import org.springframework.beans.factory.annotation.Autowired; import org.slf4j.Logger; @@ -52,12 +56,40 @@ @Autowired private IComplaintTypeV1InnerServiceSMO complaintTypeV1InnerServiceSMOImpl; @Autowired private IComplaintTypeUserV1InnerServiceSMO complaintTypeUserV1InnerServiceSMOImpl; /** * {"typeCd":"","typeName":"123","notifyWay":"WECHAT","appraiseReply":"Y","remark":"123", * "staffs":[{"address":"无","age":0,"email":"","initials":"B","levelCd":"01","name":"bbbb","orgId":"842024012258220036","orgLevel":"1", * "orgName":"物联网同步物业 / 物联网同步物业","parentOrgId":"-1","parentTwoOrgId":"-1","relCd":"1000","relCdName":"普通员工", * "relId":"842024020671010069","sex":"0","storeId":"102024012228150026","tel":"14545456666","userId":"302024020663670065","userName":"bbbb"}], * "communityId":"2024012252790005"} * * @param event 事件对象 * @param cmdDataFlowContext 请求报文数据 * @param reqJson */ @Override public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { Assert.hasKeyAndValue(reqJson, "typeName", "请求报文中未包含typeName"); Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); Assert.hasKeyAndValue(reqJson, "notifyWay", "请求报文中未包含notifyWay"); Assert.hasKeyAndValue(reqJson, "appraiseReply", "请求报文中未包含appraiseReply"); JSONArray staffs = reqJson.getJSONArray("staffs"); if (ListUtil.isNull(staffs)) { throw new CmdException("未包含人员"); } JSONObject staff = null; for(int staffIndex = 0;staffIndex < staffs.size(); staffIndex++){ staff = staffs.getJSONObject(staffIndex); Assert.hasKeyAndValue(staff, "userId", "请求报文中未包含userId"); Assert.hasKeyAndValue(staff, "name", "请求报文中未包含userName"); } } @@ -73,6 +105,20 @@ throw new CmdException("保存数据失败"); } JSONArray staffs = reqJson.getJSONArray("staffs"); JSONObject staff = null; for(int staffIndex = 0;staffIndex < staffs.size(); staffIndex++){ staff = staffs.getJSONObject(staffIndex); ComplaintTypeUserPo complaintTypeUserPo = new ComplaintTypeUserPo(); complaintTypeUserPo.setTypeCd(complaintTypePo.getTypeCd()); complaintTypeUserPo.setTypeUserId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID)); complaintTypeUserPo.setStaffName(staff.getString("name")); complaintTypeUserPo.setCommunityId(complaintTypePo.getCommunityId()); complaintTypeUserPo.setStaffId(staff.getString("userId")); complaintTypeUserV1InnerServiceSMOImpl.saveComplaintTypeUser(complaintTypeUserPo); } cmdDataFlowContext.setResponseEntity(ResultVo.success()); } } service-store/src/main/java/com/java110/store/cmd/complaintType/UpdateComplaintTypeCmd.java
@@ -15,6 +15,7 @@ */ package com.java110.store.cmd.complaintType; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.java110.core.annotation.Java110Cmd; import com.java110.core.annotation.Java110Transactional; @@ -22,11 +23,14 @@ import com.java110.core.event.cmd.Cmd; import com.java110.core.event.cmd.CmdEvent; import com.java110.core.factory.GenerateCodeFactory; import com.java110.intf.store.IComplaintTypeUserV1InnerServiceSMO; import com.java110.intf.store.IComplaintTypeV1InnerServiceSMO; import com.java110.po.complaintType.ComplaintTypePo; import com.java110.po.complaintTypeUser.ComplaintTypeUserPo; import com.java110.utils.exception.CmdException; import com.java110.utils.util.Assert; import com.java110.utils.util.BeanConvertUtil; import com.java110.utils.util.ListUtil; import com.java110.vo.ResultVo; import org.springframework.beans.factory.annotation.Autowired; import org.slf4j.Logger; @@ -52,11 +56,27 @@ @Autowired private IComplaintTypeV1InnerServiceSMO complaintTypeV1InnerServiceSMOImpl; @Autowired private IComplaintTypeUserV1InnerServiceSMO complaintTypeUserV1InnerServiceSMOImpl; @Override public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { Assert.hasKeyAndValue(reqJson, "typeCd", "typeCd不能为空"); Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空"); JSONArray staffs = reqJson.getJSONArray("staffs"); if (ListUtil.isNull(staffs)) { throw new CmdException("未包含人员"); } JSONObject staff = null; for(int staffIndex = 0;staffIndex < staffs.size(); staffIndex++){ staff = staffs.getJSONObject(staffIndex); Assert.hasKeyAndValue(staff, "userId", "请求报文中未包含userId"); Assert.hasKeyAndValue(staff, "name", "请求报文中未包含userName"); } } @Override @@ -70,6 +90,24 @@ throw new CmdException("更新数据失败"); } ComplaintTypeUserPo complaintTypeUserPo = new ComplaintTypeUserPo(); complaintTypeUserPo.setTypeCd(complaintTypePo.getTypeCd()); complaintTypeUserV1InnerServiceSMOImpl.deleteComplaintTypeUser(complaintTypeUserPo); JSONArray staffs = reqJson.getJSONArray("staffs"); JSONObject staff = null; for(int staffIndex = 0;staffIndex < staffs.size(); staffIndex++){ staff = staffs.getJSONObject(staffIndex); complaintTypeUserPo = new ComplaintTypeUserPo(); complaintTypeUserPo.setTypeCd(complaintTypePo.getTypeCd()); complaintTypeUserPo.setTypeUserId(GenerateCodeFactory.getGeneratorId("11")); complaintTypeUserPo.setStaffName(staff.getString("name")); complaintTypeUserPo.setCommunityId(complaintTypePo.getCommunityId()); complaintTypeUserPo.setStaffId(staff.getString("userId")); complaintTypeUserV1InnerServiceSMOImpl.saveComplaintTypeUser(complaintTypeUserPo); } cmdDataFlowContext.setResponseEntity(ResultVo.success()); } } service-store/src/main/java/com/java110/store/cmd/complaintTypeUser/DeleteComplaintTypeUserCmd.java
File was deleted service-store/src/main/java/com/java110/store/cmd/complaintTypeUser/SaveComplaintTypeUserCmd.java
File was deleted service-store/src/main/java/com/java110/store/cmd/complaintTypeUser/UpdateComplaintTypeUserCmd.java
File was deleted