parent
a9c507d64e
commit
c7962059c2
@ -0,0 +1,53 @@
|
||||
package com.dsic.gj_erp.bean.czzj;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class MpDhsj {
|
||||
|
||||
private String dhh;
|
||||
|
||||
private String wph;
|
||||
|
||||
private String wpjb;
|
||||
|
||||
private String gzlx;
|
||||
|
||||
private String gzbm;
|
||||
|
||||
private String dhsl;
|
||||
|
||||
private String cpxql;
|
||||
|
||||
private String gysbh;
|
||||
|
||||
private String gylb;
|
||||
|
||||
private String zt;
|
||||
|
||||
private String sysl;
|
||||
|
||||
private String xdtz;
|
||||
|
||||
private String dcCh;
|
||||
|
||||
private String dcPl;
|
||||
|
||||
private String dcFd;//船号+分段号
|
||||
|
||||
private String dcTh;
|
||||
|
||||
private String dcZl;
|
||||
|
||||
private String dcLph;
|
||||
|
||||
private String dcTpbh;
|
||||
|
||||
private String dcTpmc;
|
||||
|
||||
private String hxfl;
|
||||
|
||||
private String dhsl1;
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.dsic.gj_erp.controller.zyjh;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.dsic.gj_erp.bean.ResultBean;
|
||||
import com.dsic.gj_erp.bean.zyjh.Ycldw;
|
||||
import com.dsic.gj_erp.service.zyjh.YcldwService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("ycldw")
|
||||
@AllArgsConstructor
|
||||
public class YcldwController {
|
||||
|
||||
private final YcldwService service;
|
||||
|
||||
@PostMapping("list")
|
||||
public ResultBean<?> list(@RequestBody Ycldw ycldw) {
|
||||
return new ResultBean<>(
|
||||
service.list(Wrappers.<Ycldw>lambdaQuery()
|
||||
.eq(Ycldw::getType,Ycldw.getTypeForYcl())
|
||||
.eq(StrUtil.isNotEmpty(ycldw.getKw()),Ycldw::getKw,ycldw.getKw())
|
||||
));
|
||||
}
|
||||
|
||||
@PostMapping("submit")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ResultBean<?> edit(@RequestBody Map<String,List<Ycldw>> map) {
|
||||
if (map.get("add")!=null){
|
||||
map.get("add").forEach(item->{
|
||||
item.setTypeForYcl();
|
||||
service.save(item);
|
||||
});
|
||||
}
|
||||
|
||||
if (map.get("edit")!=null){
|
||||
service.updateBatchById(map.get("edit"));
|
||||
}
|
||||
|
||||
if (map.get("remove")!=null){
|
||||
List<Integer> remove = map.get("remove").stream().map(Ycldw::getId).collect(Collectors.toList());
|
||||
service.removeByIds(remove);
|
||||
}
|
||||
|
||||
return new ResultBean<>();
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.dsic.gj_erp.mapper.czzj;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dsic.gj_erp.bean.czzj.MpDhsj;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface MpDhsjMapper extends BaseMapper<MpDhsj> {
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.dsic.gj_erp.service.czzj;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dsic.gj_erp.bean.czzj.MpDhsj;
|
||||
import com.dsic.gj_erp.mapper.czzj.MpDhsjMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class MpDhsjServcie extends ServiceImpl<MpDhsjMapper, MpDhsj> {
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dsic.gj_erp.mapper.czzj.MpDhsjMapper">
|
||||
|
||||
</mapper>
|
Loading…
Reference in new issue