人员,工资卡,合同优化修改
This commit is contained in:
parent
8cba94bc50
commit
a1af8ab99c
|
|
@ -109,14 +109,17 @@ public class PmWorkerController extends BaseController {
|
|||
@SysLog(title = "人员入场管理", businessType = OperaType.UPDATE, logType = 0, module = "施工人员->出入场管理->人员入场管理", details = "修改人员入场")
|
||||
public AjaxResult edit(@RequestParam(value = "files",required = false) MultipartFile[] files,@RequestParam(value = "fileMsg",required = false) String fileMsg, @RequestParam(value = "params")String params) {
|
||||
try {
|
||||
List<WebFileDto> listFile = FastJsonHelper.jsonArrStrToBeanList(fileMsg, WebFileDto.class);
|
||||
// 验证对应关系
|
||||
if (listFile.size() != files.length) {
|
||||
throw new IllegalArgumentException("文件信息与文件数量不匹配");
|
||||
}
|
||||
//先将数据对应关系处理
|
||||
for (int i = 0; i < listFile.size(); i++) {
|
||||
listFile.get(i).setFile(files[i]);
|
||||
List<WebFileDto> listFile = new ArrayList<>();
|
||||
if(files != null && files.length > 0){
|
||||
listFile = FastJsonHelper.jsonArrStrToBeanList(fileMsg, WebFileDto.class);
|
||||
// 验证对应关系
|
||||
if (listFile.size() != files.length) {
|
||||
throw new IllegalArgumentException("文件信息与文件数量不匹配");
|
||||
}
|
||||
//先将数据对应关系处理
|
||||
for (int i = 0; i < listFile.size(); i++) {
|
||||
listFile.get(i).setFile(files[i]);
|
||||
}
|
||||
}
|
||||
PmWorker o = FastJsonHelper.jsonStrToBean(params, PmWorker.class);
|
||||
return toAjax(service.updateByPrimaryKey(o,listFile));
|
||||
|
|
|
|||
|
|
@ -43,9 +43,7 @@ public class BmWorkerWageCardServiceImpl implements BmWorkerWageCardService {
|
|||
if(record.getDelIds() != null){
|
||||
//修改时删除部分图片
|
||||
String[] split = record.getDelIds().split(",");
|
||||
for (String s : split) {
|
||||
fileUploadUtils.delFileListById(s,"",Constants.FILE_UPLOAD_WAGE_CARD, "");
|
||||
}
|
||||
fileUploadUtils.delFileList(split,null,null, null);
|
||||
}
|
||||
if(!listFile.isEmpty()){
|
||||
//组装数据
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ public class PmWorkerServiceImpl implements PmWorkerService{
|
|||
BmWorkerWageCard wageCard = new BmWorkerWageCard();
|
||||
wageCard.setWorkerId(id);
|
||||
BmWorkerWageCard bmWorkerWageCard = wageCardService.selectWageCardByWorkerId(wageCard);
|
||||
assert worker != null;
|
||||
worker.setBmWorkerWageCard(bmWorkerWageCard);
|
||||
if(worker.getEinStatus() == 1){
|
||||
//查询合同数据 只有入场才会有合同
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ public class FileUtilController {
|
|||
return R.fail("资源表id不能为空");
|
||||
}
|
||||
}
|
||||
Integer num= service.delFileListById( id,sourceId,sourceTable,sourceType);
|
||||
Integer num= service.delFileListById( id,sourceId,sourceType,sourceTable);
|
||||
return R.ok(num);
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -270,7 +270,6 @@ public class FileUtilsServiceImpl {
|
|||
*/
|
||||
public Integer delFileList(String[] id, String[] sourceId, String[] sourceTable, String[] sourceType) {
|
||||
List<UploadFileVo> list;
|
||||
|
||||
if(id!=null && id.length>0){
|
||||
list=mapper.getFileListByIds(id);
|
||||
int num= mapper.delFileList(id);
|
||||
|
|
|
|||
|
|
@ -29,20 +29,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
</update>
|
||||
<update id="delFileListBySourceId">
|
||||
update bm_files set is_active=0
|
||||
update bm_files set is_active = 0
|
||||
<where>
|
||||
<if test="id!=null and id!=''">
|
||||
and id=#{id}
|
||||
</if>
|
||||
<if test="sourceId !=null and sourceId!=''">
|
||||
and source_id=#{sourceId}
|
||||
</if>
|
||||
<if test="sourceType !=null and sourceType!=''">
|
||||
and source_type=#{sourceType}
|
||||
and source_type= #{sourceType}
|
||||
</if>
|
||||
<if test="sourceTable !=null and sourceTable!=''">
|
||||
and source_table=#{sourceTable}
|
||||
and source_table= #{sourceTable}
|
||||
</if>
|
||||
<if test="id !=null and id!=''">
|
||||
and id= #{id}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</update>
|
||||
|
|
|
|||
Loading…
Reference in New Issue