duyong 4 vuotta sitten
vanhempi
commit
848347d115
69 muutettua tiedostoa jossa 12266 lisäystä ja 101 poistoa
  1. 194 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/controller/DynamicBaseCameraController.java
  2. 39 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/factories/Converter.java
  3. 250 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/factories/ConverterFactories.java
  4. 221 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/factories/ConverterTranFactories.java
  5. 255 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/factories/HLSConverterFactories.java
  6. 9 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/mapper/DynamicBaseCameraMapper.java
  7. 625 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/mapper/DynamicBaseCameraMapper.xml
  8. 349 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/model/DynamicBaseCamera.java
  9. 21 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/service/IDynamicBaseCameraService.java
  10. 16 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/service/IFLVService.java
  11. 34 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/service/impl/DynamicBaseCameraServiceImpl.java
  12. 99 0
      src/main/java/com/jisco/dynamicweight/dynamicbasecamera/service/impl/FLVService.java
  13. 149 0
      src/main/java/com/jisco/dynamicweight/dynamicbasematerial/controller/DynamicBaseMaterialController.java
  14. 9 0
      src/main/java/com/jisco/dynamicweight/dynamicbasematerial/mapper/DynamicBaseMaterialMapper.java
  15. 444 0
      src/main/java/com/jisco/dynamicweight/dynamicbasematerial/mapper/DynamicBaseMaterialMapper.xml
  16. 244 0
      src/main/java/com/jisco/dynamicweight/dynamicbasematerial/model/DynamicBaseMaterial.java
  17. 26 0
      src/main/java/com/jisco/dynamicweight/dynamicbasematerial/service/IDynamicBaseMaterialService.java
  18. 43 0
      src/main/java/com/jisco/dynamicweight/dynamicbasematerial/service/impl/DynamicBaseMaterialServiceImpl.java
  19. 0 1
      src/main/java/com/jisco/dynamicweight/dynamicbasescdbconfig/controller/DynamicBaseScdbConfigController.java
  20. 2 0
      src/main/java/com/jisco/dynamicweight/dynamicbasescstation/mapper/DynamicBaseScStationMapper.xml
  21. 31 0
      src/main/java/com/jisco/dynamicweight/dynamicbasescstation/model/DynamicBaseScStation.java
  22. 0 1
      src/main/java/com/jisco/dynamicweight/dynamicbasestationmaterial/controller/DynamicBaseStationMaterialController.java
  23. 199 0
      src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/controller/DynamicWorkAuditdataController.java
  24. 16 0
      src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/mapper/DynamicWorkAuditdataMapper.java
  25. 897 0
      src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/mapper/DynamicWorkAuditdataMapper.xml
  26. 484 0
      src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/model/DynamicWorkAuditdata.java
  27. 41 0
      src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/service/IDynamicWorkAuditdataService.java
  28. 151 0
      src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/service/impl/DynamicWorkAuditdataServiceImpl.java
  29. 133 0
      src/main/java/com/jisco/dynamicweight/dynamicworktly/controller/DynamicWorkTlyController.java
  30. 9 0
      src/main/java/com/jisco/dynamicweight/dynamicworktly/mapper/DynamicWorkTlyMapper.java
  31. 372 0
      src/main/java/com/jisco/dynamicweight/dynamicworktly/mapper/DynamicWorkTlyMapper.xml
  32. 199 0
      src/main/java/com/jisco/dynamicweight/dynamicworktly/model/DynamicWorkTly.java
  33. 21 0
      src/main/java/com/jisco/dynamicweight/dynamicworktly/service/IDynamicWorkTlyService.java
  34. 34 0
      src/main/java/com/jisco/dynamicweight/dynamicworktly/service/impl/DynamicWorkTlyServiceImpl.java
  35. 89 25
      src/main/java/com/jisco/dynamicweight/dynamicworkupdata/controller/DynamicWorkUpdataController.java
  36. 43 0
      src/main/java/com/jisco/dynamicweight/dynamicworkupdata/dto/InbatchDto.java
  37. 83 0
      src/main/java/com/jisco/dynamicweight/dynamicworkupdata/dto/ReturnedDustDto.java
  38. 60 1
      src/main/java/com/jisco/dynamicweight/dynamicworkupdata/mapper/DynamicWorkUpdataMapper.java
  39. 328 33
      src/main/java/com/jisco/dynamicweight/dynamicworkupdata/mapper/DynamicWorkUpdataMapper.xml
  40. 3 3
      src/main/java/com/jisco/dynamicweight/dynamicworkupdata/model/DynamicWorkUpdata.java
  41. 58 1
      src/main/java/com/jisco/dynamicweight/dynamicworkupdata/service/IDynamicWorkUpdataService.java
  42. 243 1
      src/main/java/com/jisco/dynamicweight/dynamicworkupdata/service/impl/DynamicWorkUpdataServiceImpl.java
  43. 168 0
      src/main/java/com/jisco/dynamicweight/dynamicworkupdata/vo/AuditDataVO.java
  44. 124 0
      src/main/java/com/jisco/dynamicweight/dynamicworkupdata/vo/DailyReportVO.java
  45. 106 0
      src/main/java/com/jisco/dynamicweight/pika/controller/CenternetController.java
  46. 9 0
      src/main/java/com/jisco/dynamicweight/pika/mapper/CenternetMapper.java
  47. 2417 0
      src/main/java/com/jisco/dynamicweight/pika/mapper/CenternetMapper.xml
  48. 1009 0
      src/main/java/com/jisco/dynamicweight/pika/model/Centernet.java
  49. 27 0
      src/main/java/com/jisco/dynamicweight/pika/service/ICenternetService.java
  50. 136 0
      src/main/java/com/jisco/dynamicweight/pika/service/impl/CenternetServiceImpl.java
  51. 27 0
      src/main/java/com/jisco/dynamicweight/util/VideoUtil.java
  52. 3 3
      src/main/java/com/steerinfo/baseinfo/meterbasecar/model/MeterBaseCar.java
  53. 7 0
      src/main/java/com/steerinfo/baseinfo/meterbasedriver/service/IMeterBaseDriverService.java
  54. 10 0
      src/main/java/com/steerinfo/baseinfo/meterbasedriver/service/impl/MeterBaseDriverServiceImpl.java
  55. 283 27
      src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/controller/MeterWorkHookActFirstController.java
  56. 14 0
      src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/mapper/MeterWorkHookActFirstMapper.java
  57. 43 1
      src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/mapper/MeterWorkHookActFirstMapper.xml
  58. 24 0
      src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/service/IMeterWorkHookActFirstService.java
  59. 427 2
      src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/service/impl/MeterWorkHookActFirstServiceImpl.java
  60. 164 0
      src/main/java/com/steerinfo/meterwork/meterworkhookactual/controller/MeterWorkHookActualController.java
  61. 21 0
      src/main/java/com/steerinfo/meterwork/meterworkhookactual/mapper/MeterWorkHookActualMapper.java
  62. 82 1
      src/main/java/com/steerinfo/meterwork/meterworkhookactual/mapper/MeterWorkHookActualMapper.xml
  63. 19 0
      src/main/java/com/steerinfo/meterwork/meterworkhookactual/service/IMeterWorkHookActualService.java
  64. 502 0
      src/main/java/com/steerinfo/meterwork/meterworkhookactual/service/impl/MeterWorkHookActualServiceImpl.java
  65. 36 0
      src/main/java/com/steerinfo/pretrack/prehookscale/controller/PreHookScaleController.java
  66. 5 0
      src/main/java/com/steerinfo/pretrack/prehookscale/mapper/PreHookScaleMapper.java
  67. 41 1
      src/main/java/com/steerinfo/pretrack/prehookscale/mapper/PreHookScaleMapper.xml
  68. 9 0
      src/main/java/com/steerinfo/pretrack/prehookscale/service/IPreHookScaleService.java
  69. 30 0
      src/main/java/com/steerinfo/pretrack/prehookscale/service/impl/PreHookScaleServiceImpl.java

+ 194 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/controller/DynamicBaseCameraController.java

@@ -0,0 +1,194 @@
+package com.jisco.dynamicweight.dynamicbasecamera.controller;
+
+import cn.hutool.core.lang.Assert;
+import com.jisco.dynamicweight.dynamicbasecamera.model.DynamicBaseCamera;
+import com.jisco.dynamicweight.dynamicbasecamera.service.IDynamicBaseCameraService;
+import com.jisco.dynamicweight.dynamicbasecamera.service.IFLVService;
+import com.jisco.dynamicweight.util.VideoUtil;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.bytedeco.javacv.*;
+import org.bytedeco.opencv.opencv_core.IplImage;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Required;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+import sun.misc.BASE64Encoder;
+
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.nio.Buffer;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * DynamicBaseCamera RESTful接口:
+ *
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-02-15 09:14
+ * 类描述
+ * 修订历史:
+ * 日期:2022-02-15
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicBaseCamera RESTful接口
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ * @see null
+ */
+@RestController
+@RequestMapping("/${api.version}/dynamicbasecameras")
+public class DynamicBaseCameraController extends BaseRESTfulController {
+
+    @Autowired
+    IDynamicBaseCameraService dynamicBaseCameraService;
+
+    @Autowired
+    IFLVService flvService;
+
+    @ApiOperation(value = "获取列表", notes = "分页查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dynamicbasecamera:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas, Integer pageNum, Integer pageSize) {
+        PageList<DynamicBaseCamera> list = dynamicBaseCameraService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value = "获取列表", notes = "分页模糊查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dynamicbasecamera:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas, Integer pageNum, Integer pageSize) {
+        PageList<DynamicBaseCamera> list = dynamicBaseCameraService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value = "创建", notes = "根据DynamicBaseCamera对象创建")
+    @ApiImplicitParam(name = "dynamicBaseCamera", value = "详细实体dynamicBaseCamera", required = true, dataType = "DynamicBaseCamera")
+    //@RequiresPermissions("dynamicbasecamera:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@RequestBody DynamicBaseCamera model) {
+        DynamicBaseCamera dynamicBaseCamera = dynamicBaseCameraService.add(model);
+        return success(dynamicBaseCamera);
+    }
+
+    @ApiOperation(value = "获取详细信息", notes = "根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("dynamicbasecamera:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id) {
+        DynamicBaseCamera dynamicBaseCamera = dynamicBaseCameraService.getById(id);
+        return success(dynamicBaseCamera);
+    }
+
+    @ApiOperation(value = "更新详细信息", notes = "根据url的id来指定更新对象,并根据传过来的dynamicBaseCamera信息来更新详细信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "dynamicBaseCamera", value = "详细实体dynamicBaseCamera", required = true, dataType = "DynamicBaseCamera")
+    })
+    //@RequiresPermissions("dynamicbasecamera:update")
+    @PutMapping(value = "/{id}", produces = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody DynamicBaseCamera model) {
+        model.setId(id);
+        DynamicBaseCamera dynamicBaseCamera = dynamicBaseCameraService.modify(model);
+        return success(dynamicBaseCamera);
+    }
+
+    @ApiOperation(value = "删除", notes = "根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("dynamicbasecamera:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id) {
+        List<String> list = Arrays.asList(id.split(","));
+        if (ListUtils.isNotEmpty(list)) {
+            List<String> ids = ListUtils.convertList(list);
+            dynamicBaseCameraService.delete(ids);
+        }
+        return success();
+    }
+
+    //无需nginx推流服务器,本身服务器够强就行,切可以集群部署
+    @GetMapping(value = "/video/flv/live/{id}", produces = {"video/x-flv;charset=UTF-8"})
+    public void flvLive(@PathVariable(value = "id") String id, HttpServletResponse response,
+                        HttpServletRequest request) {
+        DynamicBaseCamera camera = dynamicBaseCameraService.getById(id);
+        String url = VideoUtil.getRTSPUrl(camera);
+        String starttime = request.getParameter("starttime");
+        String endtime = request.getParameter("endtime");
+        if (!StringUtils.isEmpty(starttime) && !StringUtils.isEmpty(endtime)) {
+            //回放
+            url = VideoUtil.getRTSPPlayBackUrl(camera);
+            starttime = starttime.replaceAll("-", "");
+            endtime = endtime.replaceAll("-", "");
+            url += "?starttime=" + starttime + "&endtime=" + endtime;
+        }
+
+        //非网关时开启这里,flvjs插件播放
+        // response.setHeader("Access-Control-Allow-Origin", "*");//走网关时去掉这行
+        flvService.open(url, id, response, request);
+    }
+
+    /**
+     * 截图
+     *
+     * @param id
+     * @return java.lang.Object
+     * @author jitwxs
+     * @date 2022/2/15 11:39
+     */
+    @GetMapping("shot")
+    public RESTfulResult shot(@RequestParam String id) throws IOException, InterruptedException {
+//        long start = System.currentTimeMillis();
+        DynamicBaseCamera camera = dynamicBaseCameraService.getById(id);
+        String url = VideoUtil.getRTSPUrl(camera);
+        FFmpegFrameGrabber fFmpegFrameGrabber = new FFmpegFrameGrabber(url);
+        fFmpegFrameGrabber.start();
+        fFmpegFrameGrabber.getAudioChannels();
+        TimeUnit.MILLISECONDS.sleep(500);
+        Frame frame = fFmpegFrameGrabber.grabImage();
+//        long end = System.currentTimeMillis();
+//        System.err.println("截图:" + (end - start));
+//        start = end;
+        Java2DFrameConverter java2DFrameConverter = new Java2DFrameConverter();
+        BufferedImage bufferedImage = java2DFrameConverter.convert(frame);
+//        end = System.currentTimeMillis();
+//        System.err.println("bufferedImage:" + (end - start));
+//        start = end;
+        //测试将jpg图片写入磁盘中
+//        File output = new File("D:\\test.jpg");
+//        ImageIO.write(bufferedImage,"jpg", output);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();//io流
+        ImageIO.write(bufferedImage, "jpg", baos);//写入流中
+        byte[] bytes = baos.toByteArray();//转换成字节
+//        end = System.currentTimeMillis();
+//        System.err.println("bytes:" + (end - start));
+//        start = end;
+        BASE64Encoder encoder = new BASE64Encoder();
+        String jpg_base64 = encoder.encodeBuffer(bytes).trim();//转换成base64串
+        jpg_base64 = jpg_base64.replaceAll("\n", "").replaceAll("\r", "");//删除 \r\n
+//        end = System.currentTimeMillis();
+//        System.err.println("jpg_base64:" + (end - start));
+//        start = end;
+//        ImageIO.write(bufferedImage, "jpg", new File("D:/qrcode1.jpg"));
+//        System.out.println("值为:" + "data:image/jpg;base64," + jpg_base64);
+        return success("data:image/jpg;base64," + jpg_base64);
+    }
+}

+ 39 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/factories/Converter.java

@@ -0,0 +1,39 @@
+package com.jisco.dynamicweight.dynamicbasecamera.factories;
+
+import javax.servlet.AsyncContext;
+import java.io.IOException;
+
+public interface Converter {
+
+	/**
+	 * 获取该转换的key
+	 */
+	public String getKey();
+
+	/**
+	 * 获取该转换的url
+	 * 
+	 * @return
+	 */
+	public String getUrl();
+
+	/**
+	 * 添加一个流输出
+	 * 
+	 * @param entity
+	 */
+	public void addOutputStreamEntity(String key, AsyncContext entity) throws IOException;
+
+	/**
+	 * 退出转换
+	 */
+	public void exit();
+
+	/**
+	 * 启动
+	 */
+	public void start();
+
+
+
+}

+ 250 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/factories/ConverterFactories.java

@@ -0,0 +1,250 @@
+package com.jisco.dynamicweight.dynamicbasecamera.factories;
+
+import org.bytedeco.ffmpeg.avcodec.AVPacket;
+import org.bytedeco.ffmpeg.global.avcodec;
+import org.bytedeco.javacv.FFmpegFrameGrabber;
+import org.bytedeco.javacv.FFmpegFrameRecorder;
+import org.bytedeco.javacv.Frame;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.AsyncContext;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * javacv转包装<br/>
+ * 无须转码,更低的资源消耗,更低的延迟<br/>
+ * 确保流来源视频H264格式,音频AAC格式
+ * 
+ * @author hzj
+ */
+public class ConverterFactories extends Thread implements Converter {
+	private static Logger logger	= LoggerFactory.getLogger( ConverterFactories.class );
+
+	public volatile boolean runing = true;
+	/**
+	 * 读流器
+	 */
+	private FFmpegFrameGrabber grabber;
+	/**
+	 * 转码器
+	 */
+	private FFmpegFrameRecorder recorder;
+
+	/**
+	 * 转FLV格式的头信息<br/>
+	 * 如果有第二个客户端播放首先要返回头信息
+	 */
+	private byte[] headers;
+	/**
+	 * 保存转换好的流
+	 */
+	private ByteArrayOutputStream stream;
+	/**
+	 * 流地址,h264,aac
+	 */
+	private String url;
+	/**
+	 * 流输出
+	 */
+	private List<AsyncContext> outEntitys;
+
+	/**
+	 * key用于表示这个转换器
+	 */
+	private String key;
+
+	/**
+	 * 转换队列
+	 */
+	private Map<String, Converter> factories;
+
+	private String videoId;
+
+	public ConverterFactories(String url, String key, Map<String, Converter> factories, List<AsyncContext> outEntitys,String videoId) {
+		this.url = url;
+		this.key = key;
+		this.factories = factories;
+		this.outEntitys = outEntitys;
+		this.videoId = videoId;
+	}
+
+	@Override
+	public void run() {
+		boolean isCloseGrabberAndResponse = true;
+		try {
+			//抓取
+			grabber = new FFmpegFrameGrabber(url);
+			if ("rtsp".equals(url.substring(0, 4))) {
+				grabber.setOption("rtsp_transport", "tcp");
+				grabber.setOption("stimeout", "5000000");
+			}
+			grabber.start();
+			//end
+			if (avcodec.AV_CODEC_ID_H264 == grabber.getVideoCodec()
+					&& (grabber.getAudioChannels() == 0 || avcodec.AV_CODEC_ID_AAC == grabber.getAudioCodec())) {
+				logger.info("this url:{} converterFactories start", url);
+				// 来源视频H264格式,音频AAC格式
+				// 无须转码,更低的资源消耗,更低的延迟
+				stream = new ByteArrayOutputStream();
+				recorder = new FFmpegFrameRecorder(stream, grabber.getImageWidth(), grabber.getImageHeight(),
+						grabber.getAudioChannels());
+			 	recorder.setInterleaved(true);
+				recorder.setVideoOption("preset", "ultrafast");
+				recorder.setVideoOption("tune", "zerolatency");
+				recorder.setVideoOption("crf", "25");
+				recorder.setFrameRate(grabber.getFrameRate());
+				recorder.setSampleRate(grabber.getSampleRate());
+				if (grabber.getAudioChannels() > 0) {
+					recorder.setAudioChannels(grabber.getAudioChannels());
+					recorder.setAudioBitrate(grabber.getAudioBitrate());
+					recorder.setAudioCodec(grabber.getAudioCodec());
+				}
+				System.out.println("11111");
+				recorder.setFormat("flv");
+				/////
+
+
+
+				recorder.setVideoBitrate(grabber.getVideoBitrate());
+			    recorder.setVideoCodec(grabber.getVideoCodec());
+				recorder.start(grabber.getFormatContext());//这个不报警告,但是不能加水印
+				//recorder.start();//这个能加水印,但是又警告
+				if (headers == null) {
+					headers = stream.toByteArray();
+					stream.reset();
+					writeResponse(headers);
+				}
+				while (runing) {
+				 	 AVPacket k = grabber.grabPacket();
+					if (k != null) {
+						try {
+							recorder.recordPacket(k);
+						} catch (Exception e) {
+						}
+						if (stream.size() > 0) {
+							byte[] b = stream.toByteArray();
+							stream.reset();
+							writeResponse(b);
+							if (outEntitys.isEmpty()) {
+								logger.info("没有输出退出");
+								break;
+							}
+						}
+						avcodec.av_packet_unref(k);
+					}
+					Thread.sleep(5);
+				}
+			} else {
+				//System.out.println("为什么会走到这?");
+				isCloseGrabberAndResponse = false;
+				// 需要转码为视频H264格式,音频AAC格式
+				ConverterTranFactories c = new ConverterTranFactories(url, key, factories, outEntitys,grabber,videoId);
+				factories.put(key, c);
+				c.start();
+			}
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+			logger.info("播放失败");
+
+		} finally {
+			closeConverter(isCloseGrabberAndResponse);
+			completeResponse(isCloseGrabberAndResponse);
+			logger.info("this url:{} converterFactories exit", url);
+
+		}
+	}
+
+	private boolean add = false;
+	/**
+	 * 输出FLV视频流
+	 * 
+	 * @param b
+	 */
+	public void writeResponse(byte[] b) {
+		Iterator<AsyncContext> it = outEntitys.iterator();
+		while (it.hasNext()) {
+			AsyncContext o = it.next();
+			try {
+				o.getResponse().getOutputStream().write(b);
+			} catch (Exception e) {
+				logger.info("移除一个输出");
+			 	o.complete();
+				it.remove();
+			}
+		}
+	}
+
+	/**
+	 * 退出转换
+	 */
+	public void closeConverter(boolean isCloseGrabberAndResponse) {
+		try{
+		 if (isCloseGrabberAndResponse) {
+			 grabber.close();
+			factories.remove(this.key);
+		 }
+			recorder.close();
+			stream.close();
+		}catch (Exception e){}
+	}
+
+	/**
+	 * 关闭异步响应
+	 * 
+	 * @param isCloseGrabberAndResponse
+	 */
+	public void completeResponse(boolean isCloseGrabberAndResponse) {
+		System.out.println("isCloseGrabberAndResponse="+isCloseGrabberAndResponse);
+		if (isCloseGrabberAndResponse) {
+			Iterator<AsyncContext> it = outEntitys.iterator();
+			while (it.hasNext()) {
+				AsyncContext o = it.next();
+				System.out.println("o="+o);
+				//o.getResponse().setContentType("application/json;charset=utf-8");
+				try{
+					o.getResponse().flushBuffer();
+				}catch (Exception e){}
+
+				o.complete();
+				it.remove();
+			}
+		}
+	}
+
+	@Override
+	public String getKey() {
+		return this.key;
+	}
+
+	@Override
+	public String getUrl() {
+		return this.url;
+	}
+
+	@Override
+	public void addOutputStreamEntity(String key, AsyncContext entity) throws IOException {
+		if (headers == null) {
+			outEntitys.add(entity);
+		} else {
+			entity.getResponse().getOutputStream().write(headers);
+			entity.getResponse().getOutputStream().flush();
+			outEntitys.add(entity);
+		}
+	}
+
+	@Override
+	public void exit() {
+		this.runing = false;
+		try {
+			this.join();
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+		}
+	}
+
+}

+ 221 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/factories/ConverterTranFactories.java

@@ -0,0 +1,221 @@
+package com.jisco.dynamicweight.dynamicbasecamera.factories;
+
+import org.bytedeco.ffmpeg.global.avcodec;
+import org.bytedeco.javacv.FFmpegFrameGrabber;
+import org.bytedeco.javacv.FFmpegFrameRecorder;
+import org.bytedeco.javacv.Frame;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.AsyncContext;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * javacv转码<br/>
+ * 流来源不是视频H264格式,音频AAC格式 转码为视频H264格式,音频AAC格式
+ * 
+ * @author hzj
+ */
+public class ConverterTranFactories extends Thread implements Converter {
+	private static Logger logger	= LoggerFactory.getLogger( ConverterTranFactories.class );
+
+	public volatile boolean runing = true;
+	/**
+	 * 读流器
+	 */
+	private FFmpegFrameGrabber grabber;
+	/**
+	 * 转码器
+	 */
+	private FFmpegFrameRecorder recorder;
+	/**
+	 * 转FLV格式的头信息<br/>
+	 * 如果有第二个客户端播放首先要返回头信息
+	 */
+	private byte[] headers;
+	/**
+	 * 保存转换好的流
+	 */
+	private ByteArrayOutputStream stream;
+	/**
+	 * 流地址,h264,aac
+	 */
+	private String url;
+	/**
+	 * 流输出
+	 */
+	private List<AsyncContext> outEntitys;
+
+	/**
+	 * key用于表示这个转换器
+	 */
+	private String key;
+
+	/**
+	 * 转换队列
+	 */
+	private Map<String, Converter> factories;
+
+	private String videoId;
+
+	public ConverterTranFactories(String url, String key, Map<String, Converter> factories,
+                                  List<AsyncContext> outEntitys, FFmpegFrameGrabber grabber,String videoId) {
+		this.url = url;
+		this.key = key;
+		this.factories = factories;
+		this.outEntitys = outEntitys;
+		this.grabber = grabber;
+		this.videoId = videoId;
+	}
+
+	@Override
+	public void run() {
+		try {
+			logger.info("this url:{} converterTranFactories start", url);
+			grabber.setFrameRate(25);
+			if (grabber.getImageWidth() > 1920) {
+				grabber.setImageWidth(1920);
+			}
+			if (grabber.getImageHeight() > 1080) {
+				grabber.setImageHeight(1080);
+			}
+			stream = new ByteArrayOutputStream();
+			recorder = new FFmpegFrameRecorder(stream, grabber.getImageWidth(), grabber.getImageHeight(),
+					grabber.getAudioChannels());
+			recorder.setInterleaved(true);
+			recorder.setVideoOption("preset", "ultrafast");
+			recorder.setVideoOption("tune", "zerolatency");
+			recorder.setVideoOption("crf", "25");
+			recorder.setGopSize(50);
+			recorder.setFrameRate(25);
+			recorder.setSampleRate(grabber.getSampleRate());
+			if (grabber.getAudioChannels() > 0) {
+				recorder.setAudioChannels(grabber.getAudioChannels());
+				recorder.setAudioBitrate(grabber.getAudioBitrate());
+				recorder.setAudioCodec(avcodec.AV_CODEC_ID_AAC);
+			}
+			recorder.setFormat("flv");
+			recorder.setVideoBitrate(grabber.getVideoBitrate());
+			recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
+			recorder.start();
+			if (headers == null) {
+				headers = stream.toByteArray();
+				stream.reset();
+				writeResponse(headers);
+			}
+			while (runing) {
+				// 抓取一帧
+				Frame f = grabber.grab();
+				if (f != null) {
+					try {
+						// 转码
+						recorder.record(f);
+					} catch (Exception e) {
+					}
+					if (stream.size() > 0) {
+						byte[] b = stream.toByteArray();
+						stream.reset();
+						writeResponse(b);
+						if (outEntitys.isEmpty()) {
+							logger.info("没有输出退出");
+							break;
+						}
+					}
+				}
+				Thread.sleep(5);
+			}
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+
+		} finally {
+			closeConverter();
+			completeResponse();
+			logger.info("this url:{} converterTranFactories exit", url);
+			factories.remove(this.key);
+		}
+	}
+
+	private boolean add = false;
+	/**
+	 * 输出FLV视频流
+	 * 
+	 * @param b
+	 */
+	public void writeResponse(byte[] b) {
+		Iterator<AsyncContext> it = outEntitys.iterator();
+		while (it.hasNext()) {
+			AsyncContext o = it.next();
+			try {
+				o.getResponse().getOutputStream().write(b);
+			} catch (Exception e) {
+				logger.info("移除一个输出",e);
+				o.complete();
+				it.remove();
+			}
+		}
+
+	}
+
+	/**
+	 * 退出转换
+	 */
+	public void closeConverter() {
+		try{
+			grabber.close();
+			recorder.close();
+			stream.close();
+			factories.remove(this.key);
+		}catch (Exception e){}
+
+	}
+
+	/**
+	 * 关闭异步响应
+	 */
+	public void completeResponse() {
+		Iterator<AsyncContext> it = outEntitys.iterator();
+		while (it.hasNext()) {
+			AsyncContext o = it.next();
+			o.complete();
+			it.remove();
+		}
+	}
+
+	@Override
+	public String getKey() {
+		return this.key;
+	}
+
+	@Override
+	public String getUrl() {
+		return this.url;
+	}
+
+	@Override
+	public void addOutputStreamEntity(String key, AsyncContext entity) throws IOException {
+		if (headers == null) {
+			outEntitys.add(entity);
+		} else {
+			entity.getResponse().getOutputStream().write(headers);
+			entity.getResponse().getOutputStream().flush();
+			outEntitys.add(entity);
+		}
+	}
+
+	@Override
+	public void exit() {
+		this.runing = false;
+		try {
+			this.join();
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+		}
+	}
+
+
+
+}

+ 255 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/factories/HLSConverterFactories.java

@@ -0,0 +1,255 @@
+package com.jisco.dynamicweight.dynamicbasecamera.factories;
+
+import org.bytedeco.ffmpeg.avcodec.AVPacket;
+import org.bytedeco.ffmpeg.avformat.AVFormatContext;
+import org.bytedeco.ffmpeg.global.avcodec;
+import org.bytedeco.ffmpeg.global.avutil;
+import org.bytedeco.javacv.FFmpegFrameGrabber;
+import org.bytedeco.javacv.FFmpegFrameRecorder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.AsyncContext;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import static org.bytedeco.ffmpeg.global.avcodec.av_packet_unref;
+
+/**
+ * javacv转包装<br/>
+ * 无须转码,更低的资源消耗,更低的延迟<br/>
+ * 确保流来源视频H264格式,音频AAC格式
+ * 
+ * @author hzj
+ */
+public class HLSConverterFactories extends Thread implements Converter {
+
+	private static Logger logger	= LoggerFactory.getLogger( HLSConverterFactories.class );
+
+	public volatile boolean runing = true;
+	/**
+	 * 读流器
+	 */
+	private FFmpegFrameGrabber grabber;
+	/**
+	 * 转码器
+	 */
+	private FFmpegFrameRecorder recorder;
+
+	/**
+	 * 转FLV格式的头信息<br/>
+	 * 如果有第二个客户端播放首先要返回头信息
+	 */
+	private byte[] headers;
+	/**
+	 * 保存转换好的流
+	 */
+	private ByteArrayOutputStream stream;
+	/**
+	 * 流地址,h264,aac
+	 */
+	private String url;
+	/**
+	 * 流输出
+	 */
+	private List<AsyncContext> outEntitys;
+
+	/**
+	 * key用于表示这个转换器
+	 */
+	private String key;
+
+	/**
+	 * 转换队列
+	 */
+	private Map<String, Converter> factories;
+
+	public HLSConverterFactories(String url, String key, Map<String, Converter> factories, List<AsyncContext> outEntitys) {
+		this.url = url;
+		this.key = key;
+		this.factories = factories;
+		this.outEntitys = outEntitys;
+	}
+
+	@Override
+	public void run() {
+		boolean isCloseGrabberAndResponse = true;
+		try {
+			//抓取
+			grabber = new FFmpegFrameGrabber(url);
+			if ("rtsp".equals(url.substring(0, 4))) {
+				grabber.setOption("rtsp_transport", "tcp");
+				grabber.setOption("stimeout", "5000000");
+			}
+			grabber.start();
+
+			int bitrate = 2500000;// 比特率
+			double framerate;// 帧率
+			int err_index = 0;// 推流过程中出现错误的次数
+			int timebase;// 时钟基
+			long dts = 0, pts = 0;// pkt的dts、pts时间戳
+			//end
+			// 开启ffmpeg日志级别;QUIET是屏蔽所有,可选INFO、DEBUG、ERROR等
+
+
+			// 异常的framerate,强制使用25帧
+			if (grabber.getFrameRate() > 0 && grabber.getFrameRate() < 100) {
+				framerate = grabber.getFrameRate();
+			} else {
+				framerate = 25.0;
+			}
+
+			bitrate = grabber.getVideoBitrate();// 获取到的比特率 0
+
+				stream = new ByteArrayOutputStream();
+				recorder = new FFmpegFrameRecorder(url, grabber.getImageWidth(), grabber.getImageHeight(),
+						grabber.getAudioChannels());
+
+				System.out.println("11111");
+				// 设置比特率
+				recorder.setVideoBitrate(bitrate);
+				// h264编/解码器
+				recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
+				// 设置音频编码
+				recorder.setAudioCodec(avcodec.AV_CODEC_ID_AAC);
+				// 视频帧率(保证视频质量的情况下最低25,低于25会出现闪屏)
+				recorder.setFrameRate(framerate);
+				// 关键帧间隔,一般与帧率相同或者是视频帧率的两倍
+				recorder.setGopSize((int) framerate);
+				// 解码器格式
+				recorder.setFormat("hls");
+				// 单个切片时长,单位是s,默认为2s
+				recorder.setOption("hls_time", "60");
+				// HLS播放的列表长度,0标识不做限制
+				recorder.setOption("hls_list_size", "0");
+				// 设置切片的ts文件序号起始值,默认从0开始,可以通过此项更改
+				recorder.setOption("start_number", "120");
+				/////
+			AVFormatContext fc = null;
+			fc = grabber.getFormatContext();
+			recorder.start(fc);
+			// 清空探测时留下的缓存
+//			grabber.flush();
+
+			AVPacket pkt = null;
+
+			for (int no_pkt_index = 0; no_pkt_index < 5 && err_index < 5;) {
+
+				pkt = grabber.grabPacket();
+				if (pkt == null || pkt.size() <= 0 || pkt.data() == null) {
+					Thread.sleep(1);
+					no_pkt_index++;
+					continue;
+				}
+				System.out.println("----------------------");
+				// 获取到的pkt的dts,pts异常,将此包丢弃掉。
+				if (pkt.dts() == avutil.AV_NOPTS_VALUE && pkt.pts() == avutil.AV_NOPTS_VALUE || pkt.pts() < dts) {
+					err_index++;
+					av_packet_unref(pkt);
+					continue;
+				}
+				// 矫正dts,pts
+				pkt.pts(pts);
+				pkt.dts(dts);
+				err_index += (recorder.recordPacket(pkt) ? 0 : 1);
+				// pts,dts累加
+				timebase = grabber.getFormatContext().streams(pkt.stream_index()).time_base().den();
+
+				pts += (timebase / (int) framerate);
+				dts += (timebase / (int) framerate);
+			}
+
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+			logger.info("播放失败");
+			//可以在这里写个错误图片流返回,这样播放器就能看到问题了
+		} finally {
+			closeConverter(isCloseGrabberAndResponse);
+			completeResponse(isCloseGrabberAndResponse);
+			logger.info("this url:{} converterFactories exit", url);
+
+		}
+	}
+
+	/**
+	 * 输出FLV视频流
+	 * 
+	 * @param b
+	 */
+	public void writeResponse(byte[] b) {
+		Iterator<AsyncContext> it = outEntitys.iterator();
+		while (it.hasNext()) {
+			AsyncContext o = it.next();
+			try {
+				o.getResponse().getOutputStream().write(b);
+			} catch (Exception e) {
+				logger.info("移除一个输出");
+				it.remove();
+			}
+		}
+	}
+
+	/**
+	 * 退出转换
+	 */
+	public void closeConverter(boolean isCloseGrabberAndResponse) {
+		try{
+			grabber.close();
+			recorder.close();
+			stream.close();
+		}catch (Exception e){}
+
+	}
+
+	/**
+	 * 关闭异步响应
+	 * 
+	 * @param isCloseGrabberAndResponse
+	 */
+	public void completeResponse(boolean isCloseGrabberAndResponse) {
+		if (isCloseGrabberAndResponse) {
+			Iterator<AsyncContext> it = outEntitys.iterator();
+			while (it.hasNext()) {
+				AsyncContext o = it.next();
+				o.complete();
+			}
+		}
+	}
+
+	@Override
+	public String getKey() {
+		return this.key;
+	}
+
+	@Override
+	public String getUrl() {
+		return this.url;
+	}
+
+	@Override
+	public void addOutputStreamEntity(String key, AsyncContext entity) throws IOException {
+		if (headers == null) {
+			outEntitys.add(entity);
+		} else {
+			entity.getResponse().getOutputStream().write(headers);
+			entity.getResponse().getOutputStream().flush();
+			outEntitys.add(entity);
+		}
+	}
+
+	@Override
+	public void exit() {
+		this.runing = false;
+		try {
+			this.join();
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+		}
+	}
+
+
+
+}

+ 9 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/mapper/DynamicBaseCameraMapper.java

@@ -0,0 +1,9 @@
+package com.jisco.dynamicweight.dynamicbasecamera.mapper;
+
+import com.jisco.dynamicweight.dynamicbasecamera.model.DynamicBaseCamera;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface DynamicBaseCameraMapper extends IBaseMapper<DynamicBaseCamera, String> {
+}

+ 625 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/mapper/DynamicBaseCameraMapper.xml

@@ -0,0 +1,625 @@
+<?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.jisco.dynamicweight.dynamicbasecamera.mapper.DynamicBaseCameraMapper">
+  <resultMap id="BaseResultMap" type="com.jisco.dynamicweight.dynamicbasecamera.model.DynamicBaseCamera">
+    <id column="CAMERA_NO" jdbcType="VARCHAR" property="cameraNo" />
+    <result column="NAME" jdbcType="VARCHAR" property="name" />
+    <result column="MS_IP" jdbcType="VARCHAR" property="msIp" />
+    <result column="NVR_IP" jdbcType="VARCHAR" property="nvrIp" />
+    <result column="MS_PORT" jdbcType="DECIMAL" property="msPort" />
+    <result column="MS_CHANNEL" jdbcType="DECIMAL" property="msChannel" />
+    <result column="CAMERA_IP" jdbcType="VARCHAR" property="cameraIp" />
+    <result column="RSTP_PORT" jdbcType="DECIMAL" property="rstpPort" />
+    <result column="VEDIO_TYPE" jdbcType="DECIMAL" property="vedioType" />
+    <result column="CAMERA_CHANNEL" jdbcType="DECIMAL" property="cameraChannel" />
+    <result column="USERNAME" jdbcType="VARCHAR" property="username" />
+    <result column="PASSWORD" jdbcType="VARCHAR" property="password" />
+    <result column="MANUFACTURER" jdbcType="VARCHAR" property="manufacturer" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag" />
+    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
+    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
+    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="columns">
+    CAMERA_NO, NAME, MS_IP, NVR_IP, MS_PORT, MS_CHANNEL, CAMERA_IP, RSTP_PORT, VEDIO_TYPE, 
+    CAMERA_CHANNEL, USERNAME, PASSWORD, MANUFACTURER, MEMO, VALID_FLAG, CREATE_MAN_NO, 
+    CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME
+  </sql>
+  <sql id="columns_alias">
+    t.CAMERA_NO, t.NAME, t.MS_IP, t.NVR_IP, t.MS_PORT, t.MS_CHANNEL, t.CAMERA_IP, t.RSTP_PORT, 
+    t.VEDIO_TYPE, t.CAMERA_CHANNEL, t.USERNAME, t.PASSWORD, t.MANUFACTURER, t.MEMO, t.VALID_FLAG, 
+    t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, 
+    t.UPDATE_TIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM DYNAMIC_BASE_CAMERA
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM DYNAMIC_BASE_CAMERA t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="cameraNo != null and cameraNo != ''">
+        and CAMERA_NO = #{cameraNo}
+      </if>
+      <if test="name != null and name != ''">
+        and NAME = #{name}
+      </if>
+      <if test="msIp != null and msIp != ''">
+        and MS_IP = #{msIp}
+      </if>
+      <if test="nvrIp != null and nvrIp != ''">
+        and NVR_IP = #{nvrIp}
+      </if>
+      <if test="msPort != null">
+        and MS_PORT = #{msPort}
+      </if>
+      <if test="msChannel != null">
+        and MS_CHANNEL = #{msChannel}
+      </if>
+      <if test="cameraIp != null and cameraIp != ''">
+        and CAMERA_IP = #{cameraIp}
+      </if>
+      <if test="rstpPort != null">
+        and RSTP_PORT = #{rstpPort}
+      </if>
+      <if test="vedioType != null">
+        and VEDIO_TYPE = #{vedioType}
+      </if>
+      <if test="cameraChannel != null">
+        and CAMERA_CHANNEL = #{cameraChannel}
+      </if>
+      <if test="username != null and username != ''">
+        and USERNAME = #{username}
+      </if>
+      <if test="password != null and password != ''">
+        and PASSWORD = #{password}
+      </if>
+      <if test="manufacturer != null and manufacturer != ''">
+        and MANUFACTURER = #{manufacturer}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO = #{memo}
+      </if>
+      <if test="validFlag != null and validFlag != ''">
+        and VALID_FLAG = #{validFlag}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="cameraNo != null and cameraNo != ''">
+        and CAMERA_NO LIKE '%${cameraNo}%'
+      </if>
+      <if test="name != null and name != ''">
+        and NAME LIKE '%${name}%'
+      </if>
+      <if test="msIp != null and msIp != ''">
+        and MS_IP LIKE '%${msIp}%'
+      </if>
+      <if test="nvrIp != null and nvrIp != ''">
+        and NVR_IP LIKE '%${nvrIp}%'
+      </if>
+      <if test="msPort != null">
+        and MS_PORT = #{msPort}
+      </if>
+      <if test="msChannel != null">
+        and MS_CHANNEL = #{msChannel}
+      </if>
+      <if test="cameraIp != null and cameraIp != ''">
+        and CAMERA_IP LIKE '%${cameraIp}%'
+      </if>
+      <if test="rstpPort != null">
+        and RSTP_PORT = #{rstpPort}
+      </if>
+      <if test="vedioType != null">
+        and VEDIO_TYPE = #{vedioType}
+      </if>
+      <if test="cameraChannel != null">
+        and CAMERA_CHANNEL = #{cameraChannel}
+      </if>
+      <if test="username != null and username != ''">
+        and USERNAME LIKE '%${username}%'
+      </if>
+      <if test="password != null and password != ''">
+        and PASSWORD LIKE '%${password}%'
+      </if>
+      <if test="manufacturer != null and manufacturer != ''">
+        and MANUFACTURER LIKE '%${manufacturer}%'
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </if>
+      <if test="validFlag != null and validFlag != ''">
+        and VALID_FLAG LIKE '%${validFlag}%'
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO LIKE '%${createManNo}%'
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME LIKE '%${createManName}%'
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO LIKE '%${updateManNo}%'
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME LIKE '%${updateManName}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from DYNAMIC_BASE_CAMERA
+    where CAMERA_NO = #{cameraNo,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from DYNAMIC_BASE_CAMERA
+    where 1!=1 
+      <if test="name != null and name != ''">
+        or NAME = #{name}
+      </if>
+      <if test="msIp != null and msIp != ''">
+        or MS_IP = #{msIp}
+      </if>
+      <if test="nvrIp != null and nvrIp != ''">
+        or NVR_IP = #{nvrIp}
+      </if>
+      <if test="msPort != null">
+        or MS_PORT = #{msPort}
+      </if>
+      <if test="msChannel != null">
+        or MS_CHANNEL = #{msChannel}
+      </if>
+      <if test="cameraIp != null and cameraIp != ''">
+        or CAMERA_IP = #{cameraIp}
+      </if>
+      <if test="rstpPort != null">
+        or RSTP_PORT = #{rstpPort}
+      </if>
+      <if test="vedioType != null">
+        or VEDIO_TYPE = #{vedioType}
+      </if>
+      <if test="cameraChannel != null">
+        or CAMERA_CHANNEL = #{cameraChannel}
+      </if>
+      <if test="username != null and username != ''">
+        or USERNAME = #{username}
+      </if>
+      <if test="password != null and password != ''">
+        or PASSWORD = #{password}
+      </if>
+      <if test="manufacturer != null and manufacturer != ''">
+        or MANUFACTURER = #{manufacturer}
+      </if>
+      <if test="memo != null and memo != ''">
+        or MEMO = #{memo}
+      </if>
+      <if test="validFlag != null and validFlag != ''">
+        or VALID_FLAG = #{validFlag}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        or CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        or CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        or UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        or UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.jisco.dynamicweight.dynamicbasecamera.model.DynamicBaseCamera">
+    insert into DYNAMIC_BASE_CAMERA (CAMERA_NO, NAME, MS_IP, 
+      NVR_IP, MS_PORT, MS_CHANNEL, 
+      CAMERA_IP, RSTP_PORT, VEDIO_TYPE, 
+      CAMERA_CHANNEL, USERNAME, PASSWORD, 
+      MANUFACTURER, MEMO, VALID_FLAG, 
+      CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
+      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME
+      )
+    values (#{cameraNo,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{msIp,jdbcType=VARCHAR}, 
+      #{nvrIp,jdbcType=VARCHAR}, #{msPort,jdbcType=DECIMAL}, #{msChannel,jdbcType=DECIMAL}, 
+      #{cameraIp,jdbcType=VARCHAR}, #{rstpPort,jdbcType=DECIMAL}, #{vedioType,jdbcType=DECIMAL}, 
+      #{cameraChannel,jdbcType=DECIMAL}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, 
+      #{manufacturer,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, 
+      #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.jisco.dynamicweight.dynamicbasecamera.model.DynamicBaseCamera">
+    insert into DYNAMIC_BASE_CAMERA
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="cameraNo != null">
+        CAMERA_NO,
+      </if>
+      <if test="name != null">
+        NAME,
+      </if>
+      <if test="msIp != null">
+        MS_IP,
+      </if>
+      <if test="nvrIp != null">
+        NVR_IP,
+      </if>
+      <if test="msPort != null">
+        MS_PORT,
+      </if>
+      <if test="msChannel != null">
+        MS_CHANNEL,
+      </if>
+      <if test="cameraIp != null">
+        CAMERA_IP,
+      </if>
+      <if test="rstpPort != null">
+        RSTP_PORT,
+      </if>
+      <if test="vedioType != null">
+        VEDIO_TYPE,
+      </if>
+      <if test="cameraChannel != null">
+        CAMERA_CHANNEL,
+      </if>
+      <if test="username != null">
+        USERNAME,
+      </if>
+      <if test="password != null">
+        PASSWORD,
+      </if>
+      <if test="manufacturer != null">
+        MANUFACTURER,
+      </if>
+      <if test="memo != null">
+        MEMO,
+      </if>
+      <if test="validFlag != null">
+        VALID_FLAG,
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO,
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO,
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="cameraNo != null">
+        #{cameraNo,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="msIp != null">
+        #{msIp,jdbcType=VARCHAR},
+      </if>
+      <if test="nvrIp != null">
+        #{nvrIp,jdbcType=VARCHAR},
+      </if>
+      <if test="msPort != null">
+        #{msPort,jdbcType=DECIMAL},
+      </if>
+      <if test="msChannel != null">
+        #{msChannel,jdbcType=DECIMAL},
+      </if>
+      <if test="cameraIp != null">
+        #{cameraIp,jdbcType=VARCHAR},
+      </if>
+      <if test="rstpPort != null">
+        #{rstpPort,jdbcType=DECIMAL},
+      </if>
+      <if test="vedioType != null">
+        #{vedioType,jdbcType=DECIMAL},
+      </if>
+      <if test="cameraChannel != null">
+        #{cameraChannel,jdbcType=DECIMAL},
+      </if>
+      <if test="username != null">
+        #{username,jdbcType=VARCHAR},
+      </if>
+      <if test="password != null">
+        #{password,jdbcType=VARCHAR},
+      </if>
+      <if test="manufacturer != null">
+        #{manufacturer,jdbcType=VARCHAR},
+      </if>
+      <if test="memo != null">
+        #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="validFlag != null">
+        #{validFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateManNo != null">
+        #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.jisco.dynamicweight.dynamicbasecamera.model.DynamicBaseCamera">
+    update DYNAMIC_BASE_CAMERA
+    set NAME = #{name,jdbcType=VARCHAR},
+      MS_IP = #{msIp,jdbcType=VARCHAR},
+      NVR_IP = #{nvrIp,jdbcType=VARCHAR},
+      MS_PORT = #{msPort,jdbcType=DECIMAL},
+      MS_CHANNEL = #{msChannel,jdbcType=DECIMAL},
+      CAMERA_IP = #{cameraIp,jdbcType=VARCHAR},
+      RSTP_PORT = #{rstpPort,jdbcType=DECIMAL},
+      VEDIO_TYPE = #{vedioType,jdbcType=DECIMAL},
+      CAMERA_CHANNEL = #{cameraChannel,jdbcType=DECIMAL},
+      USERNAME = #{username,jdbcType=VARCHAR},
+      PASSWORD = #{password,jdbcType=VARCHAR},
+      MANUFACTURER = #{manufacturer,jdbcType=VARCHAR},
+      MEMO = #{memo,jdbcType=VARCHAR},
+      VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
+      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
+    where CAMERA_NO = #{cameraNo,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.jisco.dynamicweight.dynamicbasecamera.model.DynamicBaseCamera">
+    update DYNAMIC_BASE_CAMERA
+    <set>
+      <if test="name != null">
+        NAME = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="msIp != null">
+        MS_IP = #{msIp,jdbcType=VARCHAR},
+      </if>
+      <if test="nvrIp != null">
+        NVR_IP = #{nvrIp,jdbcType=VARCHAR},
+      </if>
+      <if test="msPort != null">
+        MS_PORT = #{msPort,jdbcType=DECIMAL},
+      </if>
+      <if test="msChannel != null">
+        MS_CHANNEL = #{msChannel,jdbcType=DECIMAL},
+      </if>
+      <if test="cameraIp != null">
+        CAMERA_IP = #{cameraIp,jdbcType=VARCHAR},
+      </if>
+      <if test="rstpPort != null">
+        RSTP_PORT = #{rstpPort,jdbcType=DECIMAL},
+      </if>
+      <if test="vedioType != null">
+        VEDIO_TYPE = #{vedioType,jdbcType=DECIMAL},
+      </if>
+      <if test="cameraChannel != null">
+        CAMERA_CHANNEL = #{cameraChannel,jdbcType=DECIMAL},
+      </if>
+      <if test="username != null">
+        USERNAME = #{username,jdbcType=VARCHAR},
+      </if>
+      <if test="password != null">
+        PASSWORD = #{password,jdbcType=VARCHAR},
+      </if>
+      <if test="manufacturer != null">
+        MANUFACTURER = #{manufacturer,jdbcType=VARCHAR},
+      </if>
+      <if test="memo != null">
+        MEMO = #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="validFlag != null">
+        VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where CAMERA_NO = #{cameraNo,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where CAMERA_NO = #{cameraNo,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into DYNAMIC_BASE_CAMERA 
+      (CAMERA_NO, 
+      NAME, MS_IP, NVR_IP, 
+      MS_PORT, MS_CHANNEL, CAMERA_IP, 
+      RSTP_PORT, VEDIO_TYPE, CAMERA_CHANNEL, 
+      USERNAME, PASSWORD, MANUFACTURER, 
+      MEMO, VALID_FLAG, CREATE_MAN_NO, 
+      CREATE_MAN_NAME, CREATE_TIME, 
+      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.cameraNo,jdbcType=VARCHAR}, 
+      #{item.name,jdbcType=VARCHAR}, #{item.msIp,jdbcType=VARCHAR}, #{item.nvrIp,jdbcType=VARCHAR}, 
+      #{item.msPort,jdbcType=DECIMAL}, #{item.msChannel,jdbcType=DECIMAL}, #{item.cameraIp,jdbcType=VARCHAR}, 
+      #{item.rstpPort,jdbcType=DECIMAL}, #{item.vedioType,jdbcType=DECIMAL}, #{item.cameraChannel,jdbcType=DECIMAL}, 
+      #{item.username,jdbcType=VARCHAR}, #{item.password,jdbcType=VARCHAR}, #{item.manufacturer,jdbcType=VARCHAR}, 
+      #{item.memo,jdbcType=VARCHAR}, #{item.validFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, 
+      #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
+      #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update DYNAMIC_BASE_CAMERA
+     set
+       CAMERA_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.cameraNo,jdbcType=VARCHAR}
+       </foreach>
+       ,NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.name,jdbcType=VARCHAR}
+       </foreach>
+       ,MS_IP=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.msIp,jdbcType=VARCHAR}
+       </foreach>
+       ,NVR_IP=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.nvrIp,jdbcType=VARCHAR}
+       </foreach>
+       ,MS_PORT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.msPort,jdbcType=DECIMAL}
+       </foreach>
+       ,MS_CHANNEL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.msChannel,jdbcType=DECIMAL}
+       </foreach>
+       ,CAMERA_IP=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.cameraIp,jdbcType=VARCHAR}
+       </foreach>
+       ,RSTP_PORT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.rstpPort,jdbcType=DECIMAL}
+       </foreach>
+       ,VEDIO_TYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.vedioType,jdbcType=DECIMAL}
+       </foreach>
+       ,CAMERA_CHANNEL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.cameraChannel,jdbcType=DECIMAL}
+       </foreach>
+       ,USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.username,jdbcType=VARCHAR}
+       </foreach>
+       ,PASSWORD=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.password,jdbcType=VARCHAR}
+       </foreach>
+       ,MANUFACTURER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.manufacturer,jdbcType=VARCHAR}
+       </foreach>
+       ,MEMO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
+       </foreach>
+       ,VALID_FLAG=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CAMERA_NO" close="end">
+          when #{item.cameraNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+     where CAMERA_NO in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.cameraNo,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from DYNAMIC_BASE_CAMERA
+    where CAMERA_NO in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 349 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/model/DynamicBaseCamera.java

@@ -0,0 +1,349 @@
+package com.jisco.dynamicweight.dynamicbasecamera.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="null")
+public class DynamicBaseCamera implements IBasePO<String> {
+    /**
+     * 摄像头编号(ID)(CAMERA_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="摄像头编号(ID)",required=true)
+    private String cameraNo;
+
+    /**
+     * 名称(NAME,VARCHAR,50)
+     */
+    @ApiModelProperty(value="名称",required=true)
+    private String name;
+
+    /**
+     * 流媒体IP(MS_IP,VARCHAR,15)
+     */
+    @ApiModelProperty(value="流媒体IP",required=false)
+    private String msIp;
+
+    /**
+     * 硬盘录像机IP(NVR_IP,VARCHAR,15)
+     */
+    @ApiModelProperty(value="硬盘录像机IP",required=false)
+    private String nvrIp;
+
+    /**
+     * 流媒体端口号(MS_PORT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="流媒体端口号",required=false)
+    private BigDecimal msPort;
+
+    /**
+     * 流媒体通道号(MS_CHANNEL,DECIMAL,38)
+     */
+    @ApiModelProperty(value="流媒体通道号",required=false)
+    private BigDecimal msChannel;
+
+    /**
+     * 摄像头IP(CAMERA_IP,VARCHAR,15)
+     */
+    @ApiModelProperty(value="摄像头IP",required=false)
+    private String cameraIp;
+
+    /**
+     * RSTP端口(RSTP_PORT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="RSTP端口",required=true)
+    private Short rstpPort;
+
+    /**
+     * 码流类型(VEDIO_TYPE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="码流类型",required=true)
+    private Short vedioType;
+
+    /**
+     * 摄像头通道号(CAMERA_CHANNEL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="摄像头通道号",required=true)
+    private Short cameraChannel;
+
+    /**
+     * 用户名(USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="用户名",required=true)
+    private String username;
+
+    /**
+     * 密码(PASSWORD,VARCHAR,20)
+     */
+    @ApiModelProperty(value="密码",required=true)
+    private String password;
+
+    /**
+     * 摄像头厂家(MANUFACTURER,VARCHAR,30)
+     */
+    @ApiModelProperty(value="摄像头厂家",required=true)
+    private String manufacturer;
+
+    /**
+     * 备注(MEMO,VARCHAR,200)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String memo;
+
+    /**
+     * 状态(0:无效;1:有效)(VALID_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="状态(0:无效;1:有效)",required=true)
+    private String validFlag;
+
+    /**
+     * 创建人编号(CREATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="创建人编号",required=true)
+    private String createManNo;
+
+    /**
+     * 创建人姓名(CREATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="创建人姓名",required=true)
+    private String createManName;
+
+    /**
+     * 创建时间(YYYY-MM-DD HH:mm:SS)(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建时间(YYYY-MM-DD HH:mm:SS)",required=true)
+    private Date createTime;
+
+    /**
+     * 修改人编号(UPDATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="修改人编号",required=false)
+    private String updateManNo;
+
+    /**
+     * 修改人姓名(UPDATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改人姓名",required=false)
+    private String updateManName;
+
+    /**
+     * 修改时间(YYYY-MM-DD HH:mm:SS)(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间(YYYY-MM-DD HH:mm:SS)",required=false)
+    private Date updateTime;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.cameraNo;
+    }
+
+    @Override
+    public void setId(String cameraNo) {
+        this.cameraNo = cameraNo == null ? null : cameraNo.trim();
+    }
+
+    public String getCameraNo() {
+        return cameraNo;
+    }
+
+    public void setCameraNo(String cameraNo) {
+        this.cameraNo = cameraNo == null ? null : cameraNo.trim();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    public String getMsIp() {
+        return msIp;
+    }
+
+    public void setMsIp(String msIp) {
+        this.msIp = msIp == null ? null : msIp.trim();
+    }
+
+    public String getNvrIp() {
+        return nvrIp;
+    }
+
+    public void setNvrIp(String nvrIp) {
+        this.nvrIp = nvrIp == null ? null : nvrIp.trim();
+    }
+
+    public BigDecimal getMsPort() {
+        return msPort;
+    }
+
+    public void setMsPort(BigDecimal msPort) {
+        this.msPort = msPort;
+    }
+
+    public BigDecimal getMsChannel() {
+        return msChannel;
+    }
+
+    public void setMsChannel(BigDecimal msChannel) {
+        this.msChannel = msChannel;
+    }
+
+    public String getCameraIp() {
+        return cameraIp;
+    }
+
+    public void setCameraIp(String cameraIp) {
+        this.cameraIp = cameraIp == null ? null : cameraIp.trim();
+    }
+
+    public Short getRstpPort() {
+        return rstpPort;
+    }
+
+    public void setRstpPort(Short rstpPort) {
+        this.rstpPort = rstpPort;
+    }
+
+    public Short getVedioType() {
+        return vedioType;
+    }
+
+    public void setVedioType(Short vedioType) {
+        this.vedioType = vedioType;
+    }
+
+    public Short getCameraChannel() {
+        return cameraChannel;
+    }
+
+    public void setCameraChannel(Short cameraChannel) {
+        this.cameraChannel = cameraChannel;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username == null ? null : username.trim();
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password == null ? null : password.trim();
+    }
+
+    public String getManufacturer() {
+        return manufacturer;
+    }
+
+    public void setManufacturer(String manufacturer) {
+        this.manufacturer = manufacturer == null ? null : manufacturer.trim();
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.trim();
+    }
+
+    public String getValidFlag() {
+        return validFlag;
+    }
+
+    public void setValidFlag(String validFlag) {
+        this.validFlag = validFlag == null ? null : validFlag.trim();
+    }
+
+    public String getCreateManNo() {
+        return createManNo;
+    }
+
+    public void setCreateManNo(String createManNo) {
+        this.createManNo = createManNo == null ? null : createManNo.trim();
+    }
+
+    public String getCreateManName() {
+        return createManName;
+    }
+
+    public void setCreateManName(String createManName) {
+        this.createManName = createManName == null ? null : createManName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateManNo() {
+        return updateManNo;
+    }
+
+    public void setUpdateManNo(String updateManNo) {
+        this.updateManNo = updateManNo == null ? null : updateManNo.trim();
+    }
+
+    public String getUpdateManName() {
+        return updateManName;
+    }
+
+    public void setUpdateManName(String updateManName) {
+        this.updateManName = updateManName == null ? null : updateManName.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", cameraNo=").append(cameraNo);
+        sb.append(", name=").append(name);
+        sb.append(", msIp=").append(msIp);
+        sb.append(", nvrIp=").append(nvrIp);
+        sb.append(", msPort=").append(msPort);
+        sb.append(", msChannel=").append(msChannel);
+        sb.append(", cameraIp=").append(cameraIp);
+        sb.append(", rstpPort=").append(rstpPort);
+        sb.append(", vedioType=").append(vedioType);
+        sb.append(", cameraChannel=").append(cameraChannel);
+        sb.append(", username=").append(username);
+        sb.append(", password=").append(password);
+        sb.append(", manufacturer=").append(manufacturer);
+        sb.append(", memo=").append(memo);
+        sb.append(", validFlag=").append(validFlag);
+        sb.append(", createManNo=").append(createManNo);
+        sb.append(", createManName=").append(createManName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateManNo=").append(updateManNo);
+        sb.append(", updateManName=").append(updateManName);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 21 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/service/IDynamicBaseCameraService.java

@@ -0,0 +1,21 @@
+package com.jisco.dynamicweight.dynamicbasecamera.service;
+
+import com.jisco.dynamicweight.dynamicbasecamera.model.DynamicBaseCamera;
+import com.steerinfo.framework.service.IBaseService;
+
+/**
+ * DynamicBaseCamera服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-02-15 09:14
+ * 类描述
+ * 修订历史:
+ * 日期:2022-02-15
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicBaseCamera服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IDynamicBaseCameraService extends IBaseService<DynamicBaseCamera, String>{
+
+}

+ 16 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/service/IFLVService.java

@@ -0,0 +1,16 @@
+package com.jisco.dynamicweight.dynamicbasecamera.service;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public interface IFLVService {
+
+	/**
+	 * 打开一个流地址
+	 * 
+	 * @param url
+	 * @param response
+	 */
+	public void open(String url, String videoId, HttpServletResponse response, HttpServletRequest request);
+
+}

+ 34 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/service/impl/DynamicBaseCameraServiceImpl.java

@@ -0,0 +1,34 @@
+package com.jisco.dynamicweight.dynamicbasecamera.service.impl;
+
+import com.jisco.dynamicweight.dynamicbasecamera.mapper.DynamicBaseCameraMapper;
+import com.jisco.dynamicweight.dynamicbasecamera.model.DynamicBaseCamera;
+import com.jisco.dynamicweight.dynamicbasecamera.service.IDynamicBaseCameraService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * DynamicBaseCamera服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-02-15 09:14
+ * 类描述
+ * 修订历史:
+ * 日期:2022-02-15
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicBaseCamera服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "dynamicBaseCameraService")
+public class DynamicBaseCameraServiceImpl extends BaseServiceImpl<DynamicBaseCamera, String> implements IDynamicBaseCameraService {
+
+    @Autowired
+    private DynamicBaseCameraMapper dynamicBaseCameraMapper;
+
+    @Override
+    protected IBaseMapper<DynamicBaseCamera, String> getMapper() {
+        return dynamicBaseCameraMapper;
+    }
+}

+ 99 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasecamera/service/impl/FLVService.java

@@ -0,0 +1,99 @@
+package com.jisco.dynamicweight.dynamicbasecamera.service.impl;
+
+import com.jisco.dynamicweight.dynamicbasecamera.factories.Converter;
+import com.jisco.dynamicweight.dynamicbasecamera.factories.ConverterFactories;
+import com.jisco.dynamicweight.dynamicbasecamera.service.IFLVService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import javax.servlet.AsyncContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * FLV流转换
+ * 
+ * @author hzj
+ */
+
+@Service(value = "flvService")
+public class FLVService implements IFLVService {
+	private static Logger logger	= LoggerFactory.getLogger( FLVService.class );
+	private Map<String, Converter> converters = new HashMap<String, Converter>();
+
+	@Override
+	public void open(String url,String videoId, HttpServletResponse response, HttpServletRequest request) {
+		String key = md5(url);
+
+		AsyncContext async = request.startAsync();
+		async.setTimeout(0);
+		if (converters.containsKey(key) && url.indexOf("/tracks")==-1) {
+			System.out.println("exit Transter");
+			Converter c = converters.get(key);
+			try {
+				c.addOutputStreamEntity(key, async);
+			} catch (IOException e) {
+				logger.error(e.getMessage(), e);
+				throw new IllegalArgumentException(e.getMessage());
+			}
+		} else {
+		   Converter converter = converters.get(key);
+			if(converter!=null){
+				System.out.println("converter exit to exit");
+				converter.exit();
+			}
+			System.out.println("new Transter");
+			List<AsyncContext> outs = new ArrayList<AsyncContext>();
+			outs.add(async);
+			ConverterFactories c = new ConverterFactories(url, key, converters, outs,videoId);
+			c.start();
+			converters.put(key, c);
+		}
+
+		//System.out.println(converters);
+		response.setContentType("video/x-flv");
+		response.setHeader("Connection", "keep-alive");
+
+		try {
+			//response.getWriter().write("{\"code\":200}");
+			response.setStatus(HttpServletResponse.SC_OK);
+			response.flushBuffer();
+		} catch (IOException e) {
+			logger.error(e.getMessage(), e);
+		}
+	}
+
+	public String md5(String plainText) {
+		StringBuilder buf = null;
+		try {
+			MessageDigest md = MessageDigest.getInstance("MD5");
+			md.update(plainText.getBytes());
+			byte b[] = md.digest();
+			int i;
+			buf = new StringBuilder("");
+			for (int offset = 0; offset < b.length; offset++) {
+				i = b[offset];
+				if (i < 0)
+				{
+					i += 256;
+				}
+				if (i < 16)
+				{
+					buf.append("0");
+				}
+				buf.append(Integer.toHexString(i));
+			}
+		} catch (NoSuchAlgorithmException e) {
+			logger.error(e.getMessage(), e);
+		}
+		return buf.toString();
+	}
+
+}

+ 149 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasematerial/controller/DynamicBaseMaterialController.java

@@ -0,0 +1,149 @@
+package com.jisco.dynamicweight.dynamicbasematerial.controller;
+
+import cn.hutool.core.lang.Assert;
+import com.jisco.dynamicweight.dynamicbasematerial.model.DynamicBaseMaterial;
+import com.jisco.dynamicweight.dynamicbasematerial.service.IDynamicBaseMaterialService;
+import com.jisco.dynamicweight.util.ExcelUtil;
+import com.jisco.dynamicweight.util.UserUtil;
+import com.steerinfo.baseinfo.meterbasecalibrarelation.model.MeterBaseCalibraRelation;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.meterwork.except.MarkerMetException;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * DynamicBaseMaterial RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-01-06 10:10
+ * 类描述
+ * 修订历史:
+ * 日期:2022-01-06
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicBaseMaterial RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/dynamicbasematerials")
+public class DynamicBaseMaterialController extends BaseRESTfulController {
+
+    @Autowired
+    IDynamicBaseMaterialService dynamicBaseMaterialService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dynamicbasemeterial:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DynamicBaseMaterial> list = dynamicBaseMaterialService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dynamicbasemeterial:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DynamicBaseMaterial> list = dynamicBaseMaterialService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据DynamicBaseMaterial对象创建")
+    @ApiImplicitParam(name = "dynamicBaseMaterial", value = "详细实体dynamicBaseMaterial", required = true, dataType = "DynamicBaseMaterial")
+    //@RequiresPermissions("dynamicbasemeterial:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@RequestBody DynamicBaseMaterial model){
+        Assert.isTrue(StringUtils.isNotBlank(model.getMaterialName()), "请输入物料名称!");
+        Assert.isTrue(StringUtils.isNotBlank(model.getMaterialCode()), "请输入物料编码!");
+        Assert.isTrue(StringUtils.isNotBlank(model.getPikaMaterialName()), "请输入皮卡系统物料名称!");
+        Assert.isTrue(StringUtils.isNotBlank(model.getValidFlag()), "有效标识不能为空!");
+        Assert.isTrue(Objects.nonNull(model.getIsReturnedDust()), "请选择是否返粉!");
+        Assert.isTrue(Objects.nonNull(model.getIsCoke()), "请选择是否是焦炭!");
+        model.setCreateManNo(UserUtil.getCurrentUserId());
+        model.setCreateManName(UserUtil.getCurrentUserName());
+        model.setCreateTime(new Date());
+        DynamicBaseMaterial dynamicBaseMaterial = dynamicBaseMaterialService.add(model);
+        return success(dynamicBaseMaterial);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("dynamicbasemeterial:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        DynamicBaseMaterial dynamicBaseMaterial = dynamicBaseMaterialService.getById(id);
+        return success(dynamicBaseMaterial);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的dynamicBaseMaterial信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "dynamicBaseMaterial", value = "详细实体dynamicBaseMaterial", required = true, dataType = "DynamicBaseMaterial")
+    })
+    //@RequiresPermissions("dynamicbasemeterial:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody DynamicBaseMaterial model){
+        Assert.isTrue(StringUtils.isNotBlank(model.getMaterialName()), "请输入物料名称!");
+        Assert.isTrue(StringUtils.isNotBlank(model.getMaterialCode()), "请输入物料编码!");
+        Assert.isTrue(StringUtils.isNotBlank(model.getPikaMaterialName()), "请输入皮卡系统物料名称!");
+        Assert.isTrue(StringUtils.isNotBlank(model.getValidFlag()), "有效标识不能为空!");
+        Assert.isTrue(Objects.nonNull(model.getIsReturnedDust()), "请选择是否返粉!");
+        Assert.isTrue(Objects.nonNull(model.getIsCoke()), "请选择是否是焦炭!");
+        model.setId(id);
+        model.setUpdateManNo(UserUtil.getCurrentUserId());
+        model.setUpdateManName(UserUtil.getCurrentUserName());
+        model.setUpdateTime(new Date());
+        DynamicBaseMaterial dynamicBaseMaterial = dynamicBaseMaterialService.modify(model);
+        return success(dynamicBaseMaterial);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("dynamicbasemeterial:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  dynamicBaseMaterialService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value = "导出Excel", notes = "导出Excel")
+    @PostMapping(value = "/exportExcel")//String
+    public void exportExcel(HttpServletResponse response) throws IOException {
+        List<DynamicBaseMaterial> list = dynamicBaseMaterialService.query(null);
+        ExcelUtil.exportExcel(response, list, DynamicBaseMaterial.class, "动态秤物料信息");
+    }
+
+    @ApiOperation(value = "获取列表", notes = "不分页查询")
+    @GetMapping(value = "/noPage")
+    public RESTfulResult listall(@RequestParam HashMap parmas) {
+        try {
+            List<MeterBaseCalibraRelation> list = dynamicBaseMaterialService.queryall(parmas);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+}

+ 9 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasematerial/mapper/DynamicBaseMaterialMapper.java

@@ -0,0 +1,9 @@
+package com.jisco.dynamicweight.dynamicbasematerial.mapper;
+
+import com.jisco.dynamicweight.dynamicbasematerial.model.DynamicBaseMaterial;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface DynamicBaseMaterialMapper extends IBaseMapper<DynamicBaseMaterial, String> {
+}

+ 444 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasematerial/mapper/DynamicBaseMaterialMapper.xml

@@ -0,0 +1,444 @@
+<?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.jisco.dynamicweight.dynamicbasematerial.mapper.DynamicBaseMaterialMapper">
+  <resultMap id="BaseResultMap" type="com.jisco.dynamicweight.dynamicbasematerial.model.DynamicBaseMaterial">
+    <id column="MATERIAL_NO" jdbcType="VARCHAR" property="materialNo" />
+    <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName" />
+    <result column="MATERIAL_CODE" jdbcType="VARCHAR" property="materialCode" />
+    <result column="PIKA_MATERIAL_NAME" jdbcType="VARCHAR" property="pikaMaterialName" />
+    <result column="IS_RETURNED_DUST" jdbcType="DECIMAL" property="isReturnedDust" />
+    <result column="IS_COKE" jdbcType="DECIMAL" property="isCoke" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag" />
+    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
+    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
+    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="columns">
+    MATERIAL_NO, MATERIAL_NAME, MATERIAL_CODE, PIKA_MATERIAL_NAME, IS_RETURNED_DUST, 
+    IS_COKE, MEMO, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, 
+    UPDATE_MAN_NAME, UPDATE_TIME
+  </sql>
+  <sql id="columns_alias">
+    t.MATERIAL_NO, t.MATERIAL_NAME, t.MATERIAL_CODE, t.PIKA_MATERIAL_NAME, t.IS_RETURNED_DUST, 
+    t.IS_COKE, t.MEMO, t.VALID_FLAG, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, 
+    t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM DYNAMIC_BASE_MATERIAL
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM DYNAMIC_BASE_MATERIAL t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="materialNo != null and materialNo != ''">
+        and MATERIAL_NO = #{materialNo}
+      </if>
+      <if test="materialName != null and materialName != ''">
+        and MATERIAL_NAME = #{materialName}
+      </if>
+      <if test="materialCode != null and materialCode != ''">
+        and MATERIAL_CODE = #{materialCode}
+      </if>
+      <if test="pikaMaterialName != null and pikaMaterialName != ''">
+        and PIKA_MATERIAL_NAME = #{pikaMaterialName}
+      </if>
+      <if test="isReturnedDust != null">
+        and IS_RETURNED_DUST = #{isReturnedDust}
+      </if>
+      <if test="isCoke != null">
+        and IS_COKE = #{isCoke}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO = #{memo}
+      </if>
+      <if test="validFlag != null and validFlag != ''">
+        and VALID_FLAG = #{validFlag}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="materialNo != null and materialNo != ''">
+        and MATERIAL_NO LIKE '%${materialNo}%'
+      </if>
+      <if test="materialName != null and materialName != ''">
+        and MATERIAL_NAME LIKE '%${materialName}%'
+      </if>
+      <if test="materialCode != null and materialCode != ''">
+        and MATERIAL_CODE LIKE '%${materialCode}%'
+      </if>
+      <if test="pikaMaterialName != null and pikaMaterialName != ''">
+        and PIKA_MATERIAL_NAME LIKE '%${pikaMaterialName}%'
+      </if>
+      <if test="isReturnedDust != null">
+        and IS_RETURNED_DUST = #{isReturnedDust}
+      </if>
+      <if test="isCoke != null">
+        and IS_COKE = #{isCoke}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </if>
+      <if test="validFlag != null and validFlag != ''">
+        and VALID_FLAG LIKE '%${validFlag}%'
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO LIKE '%${createManNo}%'
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME LIKE '%${createManName}%'
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO LIKE '%${updateManNo}%'
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME LIKE '%${updateManName}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from DYNAMIC_BASE_MATERIAL
+    where MATERIAL_NO = #{materialNo,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from DYNAMIC_BASE_MATERIAL
+    where 1!=1 
+      <if test="materialName != null and materialName != ''">
+        or MATERIAL_NAME = #{materialName}
+      </if>
+      <if test="materialCode != null and materialCode != ''">
+        or MATERIAL_CODE = #{materialCode}
+      </if>
+      <if test="pikaMaterialName != null and pikaMaterialName != ''">
+        or PIKA_MATERIAL_NAME = #{pikaMaterialName}
+      </if>
+      <if test="isReturnedDust != null">
+        or IS_RETURNED_DUST = #{isReturnedDust}
+      </if>
+      <if test="isCoke != null">
+        or IS_COKE = #{isCoke}
+      </if>
+      <if test="memo != null and memo != ''">
+        or MEMO = #{memo}
+      </if>
+      <if test="validFlag != null and validFlag != ''">
+        or VALID_FLAG = #{validFlag}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        or CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        or CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        or UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        or UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.jisco.dynamicweight.dynamicbasematerial.model.DynamicBaseMaterial">
+    insert into DYNAMIC_BASE_MATERIAL (MATERIAL_NO, MATERIAL_NAME, MATERIAL_CODE, 
+      PIKA_MATERIAL_NAME, IS_RETURNED_DUST, IS_COKE, 
+      MEMO, VALID_FLAG, CREATE_MAN_NO, 
+      CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, 
+      UPDATE_MAN_NAME, UPDATE_TIME)
+    values (#{materialNo,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, #{materialCode,jdbcType=VARCHAR}, 
+      #{pikaMaterialName,jdbcType=VARCHAR}, #{isReturnedDust,jdbcType=DECIMAL}, #{isCoke,jdbcType=DECIMAL}, 
+      #{memo,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, 
+      #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, 
+      #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.jisco.dynamicweight.dynamicbasematerial.model.DynamicBaseMaterial">
+    insert into DYNAMIC_BASE_MATERIAL
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="materialNo != null">
+        MATERIAL_NO,
+      </if>
+      <if test="materialName != null">
+        MATERIAL_NAME,
+      </if>
+      <if test="materialCode != null">
+        MATERIAL_CODE,
+      </if>
+      <if test="pikaMaterialName != null">
+        PIKA_MATERIAL_NAME,
+      </if>
+      <if test="isReturnedDust != null">
+        IS_RETURNED_DUST,
+      </if>
+      <if test="isCoke != null">
+        IS_COKE,
+      </if>
+      <if test="memo != null">
+        MEMO,
+      </if>
+      <if test="validFlag != null">
+        VALID_FLAG,
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO,
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO,
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="materialNo != null">
+        #{materialNo,jdbcType=VARCHAR},
+      </if>
+      <if test="materialName != null">
+        #{materialName,jdbcType=VARCHAR},
+      </if>
+      <if test="materialCode != null">
+        #{materialCode,jdbcType=VARCHAR},
+      </if>
+      <if test="pikaMaterialName != null">
+        #{pikaMaterialName,jdbcType=VARCHAR},
+      </if>
+      <if test="isReturnedDust != null">
+        #{isReturnedDust,jdbcType=DECIMAL},
+      </if>
+      <if test="isCoke != null">
+        #{isCoke,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="validFlag != null">
+        #{validFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateManNo != null">
+        #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.jisco.dynamicweight.dynamicbasematerial.model.DynamicBaseMaterial">
+    update DYNAMIC_BASE_MATERIAL
+    set MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
+      MATERIAL_CODE = #{materialCode,jdbcType=VARCHAR},
+      PIKA_MATERIAL_NAME = #{pikaMaterialName,jdbcType=VARCHAR},
+      IS_RETURNED_DUST = #{isReturnedDust,jdbcType=DECIMAL},
+      IS_COKE = #{isCoke,jdbcType=DECIMAL},
+      MEMO = #{memo,jdbcType=VARCHAR},
+      VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
+      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
+    where MATERIAL_NO = #{materialNo,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.jisco.dynamicweight.dynamicbasematerial.model.DynamicBaseMaterial">
+    update DYNAMIC_BASE_MATERIAL
+    <set>
+      <if test="materialName != null">
+        MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
+      </if>
+      <if test="materialCode != null">
+        MATERIAL_CODE = #{materialCode,jdbcType=VARCHAR},
+      </if>
+      <if test="pikaMaterialName != null">
+        PIKA_MATERIAL_NAME = #{pikaMaterialName,jdbcType=VARCHAR},
+      </if>
+      <if test="isReturnedDust != null">
+        IS_RETURNED_DUST = #{isReturnedDust,jdbcType=DECIMAL},
+      </if>
+      <if test="isCoke != null">
+        IS_COKE = #{isCoke,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        MEMO = #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="validFlag != null">
+        VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where MATERIAL_NO = #{materialNo,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where MATERIAL_NO = #{materialNo,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into DYNAMIC_BASE_MATERIAL 
+      (MATERIAL_NO, 
+      MATERIAL_NAME, MATERIAL_CODE, PIKA_MATERIAL_NAME, 
+      IS_RETURNED_DUST, IS_COKE, MEMO, 
+      VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, 
+      CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
+      UPDATE_TIME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.materialNo,jdbcType=VARCHAR}, 
+      #{item.materialName,jdbcType=VARCHAR}, #{item.materialCode,jdbcType=VARCHAR}, #{item.pikaMaterialName,jdbcType=VARCHAR}, 
+      #{item.isReturnedDust,jdbcType=DECIMAL}, #{item.isCoke,jdbcType=DECIMAL}, #{item.memo,jdbcType=VARCHAR}, 
+      #{item.validFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, 
+      #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update DYNAMIC_BASE_MATERIAL
+     set
+       MATERIAL_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.materialNo,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIAL_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.materialName,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIAL_CODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.materialCode,jdbcType=VARCHAR}
+       </foreach>
+       ,PIKA_MATERIAL_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.pikaMaterialName,jdbcType=VARCHAR}
+       </foreach>
+       ,IS_RETURNED_DUST=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.isReturnedDust,jdbcType=DECIMAL}
+       </foreach>
+       ,IS_COKE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.isCoke,jdbcType=DECIMAL}
+       </foreach>
+       ,MEMO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
+       </foreach>
+       ,VALID_FLAG=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MATERIAL_NO" close="end">
+          when #{item.materialNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+     where MATERIAL_NO in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.materialNo,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from DYNAMIC_BASE_MATERIAL
+    where MATERIAL_NO in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 244 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasematerial/model/DynamicBaseMaterial.java

@@ -0,0 +1,244 @@
+package com.jisco.dynamicweight.dynamicbasematerial.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="动态秤物料表")
+public class DynamicBaseMaterial implements IBasePO<String> {
+    /**
+     * ID(Material_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="ID",required=true)
+    private String materialNo;
+
+    /**
+     * 物料名称(Material_NAME,VARCHAR,60)
+     */
+    @ApiModelProperty(value="物料名称",required=false)
+    private String materialName;
+
+    /**
+     * 物料编码(Material_CODE,VARCHAR,60)
+     */
+    @ApiModelProperty(value="物料编码",required=false)
+    private String materialCode;
+
+    /**
+     * PIKA物料名称(PIKA_Material_NAME,VARCHAR,60)
+     */
+    @ApiModelProperty(value="PIKA物料名称",required=false)
+    private String pikaMaterialName;
+
+    /**
+     * 是否返粉(IS_RETURNED_DUST,DECIMAL,38)
+     */
+    @ApiModelProperty(value="是否返粉",required=true)
+    private BigDecimal isReturnedDust;
+
+    /**
+     * 是否焦炭(IS_COKE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="是否焦炭",required=true)
+    private Short isCoke;
+
+    /**
+     * 备注(MEMO,VARCHAR,200)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String memo;
+
+    /**
+     * 状态(0:无效;1:有效)(VALID_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="状态(0:无效;1:有效)",required=false)
+    private String validFlag;
+
+    /**
+     * 创建人编号(CREATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="创建人编号",required=false)
+    private String createManNo;
+
+    /**
+     * 创建人姓名(CREATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="创建人姓名",required=false)
+    private String createManName;
+
+    /**
+     * 创建时间(YYYY-MM-DD HH:mm:SS)(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建时间(YYYY-MM-DD HH:mm:SS)",required=false)
+    private Date createTime;
+
+    /**
+     * 修改人编号(UPDATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="修改人编号",required=false)
+    private String updateManNo;
+
+    /**
+     * 修改人姓名(UPDATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改人姓名",required=false)
+    private String updateManName;
+
+    /**
+     * 修改时间(YYYY-MM-DD HH:mm:SS)(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间(YYYY-MM-DD HH:mm:SS)",required=false)
+    private Date updateTime;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.materialNo;
+    }
+
+    @Override
+    public void setId(String materialNo) {
+        this.materialNo = materialNo == null ? null : materialNo.trim();
+    }
+
+    public String getMaterialNo() {
+        return materialNo;
+    }
+
+    public void setMaterialNo(String materialNo) {
+        this.materialNo = materialNo == null ? null : materialNo.trim();
+    }
+
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName == null ? null : materialName.trim();
+    }
+
+    public String getMaterialCode() {
+        return materialCode;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode == null ? null : materialCode.trim();
+    }
+
+    public String getPikaMaterialName() {
+        return pikaMaterialName;
+    }
+
+    public void setPikaMaterialName(String pikaMaterialName) {
+        this.pikaMaterialName = pikaMaterialName == null ? null : pikaMaterialName.trim();
+    }
+
+    public BigDecimal getIsReturnedDust() {
+        return isReturnedDust;
+    }
+
+    public void setIsReturnedDust(BigDecimal isReturnedDust) {
+        this.isReturnedDust = isReturnedDust;
+    }
+
+    public Short getIsCoke() {
+        return isCoke;
+    }
+
+    public void setIsCoke(Short isCoke) {
+        this.isCoke = isCoke;
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.trim();
+    }
+
+    public String getValidFlag() {
+        return validFlag;
+    }
+
+    public void setValidFlag(String validFlag) {
+        this.validFlag = validFlag == null ? null : validFlag.trim();
+    }
+
+    public String getCreateManNo() {
+        return createManNo;
+    }
+
+    public void setCreateManNo(String createManNo) {
+        this.createManNo = createManNo == null ? null : createManNo.trim();
+    }
+
+    public String getCreateManName() {
+        return createManName;
+    }
+
+    public void setCreateManName(String createManName) {
+        this.createManName = createManName == null ? null : createManName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateManNo() {
+        return updateManNo;
+    }
+
+    public void setUpdateManNo(String updateManNo) {
+        this.updateManNo = updateManNo == null ? null : updateManNo.trim();
+    }
+
+    public String getUpdateManName() {
+        return updateManName;
+    }
+
+    public void setUpdateManName(String updateManName) {
+        this.updateManName = updateManName == null ? null : updateManName.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", materialNo=").append(materialNo);
+        sb.append(", materialName=").append(materialName);
+        sb.append(", materialCode=").append(materialCode);
+        sb.append(", pikaMaterialName=").append(pikaMaterialName);
+        sb.append(", isReturnedDust=").append(isReturnedDust);
+        sb.append(", isCoke=").append(isCoke);
+        sb.append(", memo=").append(memo);
+        sb.append(", validFlag=").append(validFlag);
+        sb.append(", createManNo=").append(createManNo);
+        sb.append(", createManName=").append(createManName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateManNo=").append(updateManNo);
+        sb.append(", updateManName=").append(updateManName);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 26 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasematerial/service/IDynamicBaseMaterialService.java

@@ -0,0 +1,26 @@
+package com.jisco.dynamicweight.dynamicbasematerial.service;
+
+import com.jisco.dynamicweight.dynamicbasematerial.model.DynamicBaseMaterial;
+import com.steerinfo.baseinfo.meterbasecalibrarelation.model.MeterBaseCalibraRelation;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * DynamicBaseMeterial服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-01-19 04:34
+ * 类描述
+ * 修订历史:
+ * 日期:2022-01-19
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicBaseMeterial服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IDynamicBaseMaterialService extends IBaseService<DynamicBaseMaterial, String>{
+
+    List<MeterBaseCalibraRelation> queryall(HashMap parmas);
+}

+ 43 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasematerial/service/impl/DynamicBaseMaterialServiceImpl.java

@@ -0,0 +1,43 @@
+package com.jisco.dynamicweight.dynamicbasematerial.service.impl;
+
+import com.jisco.dynamicweight.dynamicbasematerial.mapper.DynamicBaseMaterialMapper;
+import com.jisco.dynamicweight.dynamicbasematerial.model.DynamicBaseMaterial;
+import com.jisco.dynamicweight.dynamicbasematerial.service.IDynamicBaseMaterialService;
+import com.steerinfo.baseinfo.meterbasecalibrarelation.model.MeterBaseCalibraRelation;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * DynamicBaseMeterial服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-01-19 04:34
+ * 类描述
+ * 修订历史:
+ * 日期:2022-01-19
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicBaseMeterial服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "dynamicBaseMaterialService")
+public class DynamicBaseMaterialServiceImpl extends BaseServiceImpl<DynamicBaseMaterial, String> implements IDynamicBaseMaterialService {
+
+    @Autowired
+    private DynamicBaseMaterialMapper dynamicBaseMaterialMapper;
+
+    @Override
+    protected IBaseMapper<DynamicBaseMaterial, String> getMapper() {
+        return dynamicBaseMaterialMapper;
+    }
+
+    @Override
+    public List<MeterBaseCalibraRelation> queryall(HashMap parmas) {
+        return dynamicBaseMaterialMapper.selectByParameters(parmas);
+    }
+}

+ 0 - 1
src/main/java/com/jisco/dynamicweight/dynamicbasescdbconfig/controller/DynamicBaseScdbConfigController.java

@@ -1,7 +1,6 @@
 package com.jisco.dynamicweight.dynamicbasescdbconfig.controller;
 
 import cn.hutool.core.lang.Assert;
-import com.jisco.dynamicweight.dynamicbasemeterial.model.DynamicBaseMeterial;
 import com.jisco.dynamicweight.dynamicbasescdbconfig.model.DynamicBaseScdbConfig;
 import com.jisco.dynamicweight.dynamicbasescdbconfig.service.IDynamicBaseScdbConfigService;
 import com.jisco.dynamicweight.util.ExcelUtil;

+ 2 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasescstation/mapper/DynamicBaseScStationMapper.xml

@@ -13,6 +13,8 @@
     <result column="RECIEVER_CODE" jdbcType="VARCHAR" property="recieverCode" />
     <result column="RECIEVER_NAME" jdbcType="VARCHAR" property="recieverName" />
     <result column="RECIEVER_TYPE" jdbcType="VARCHAR" property="recieverType" />
+    <result column="IS_UPLOAD" jdbcType="DECIMAL" property="isUpload" />
+    <result column="IS_INBATCHES" jdbcType="DECIMAL" property="isInbatches" />
     <result column="MEMO" jdbcType="VARCHAR" property="memo" />
     <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag" />
     <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />

+ 31 - 0
src/main/java/com/jisco/dynamicweight/dynamicbasescstation/model/DynamicBaseScStation.java

@@ -4,6 +4,7 @@ import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 @ApiModel(value="null")
@@ -74,6 +75,18 @@ public class DynamicBaseScStation implements IBasePO<String> {
     @ApiModelProperty(value="收货点类型",required=true)
     private String recieverType;
 
+    /**
+     * 是否上传皮卡(IS_UPLOAD,DECIMAL,38)
+     */
+    @ApiModelProperty(value="是否上传皮卡",required=true)
+    private BigDecimal isUpload;
+
+    /**
+     * 是否分批(IS_INBATCHES,DECIMAL,38)
+     */
+    @ApiModelProperty(value="是否分批",required=true)
+    private BigDecimal isInbatches;
+
     /**
      * 备注(MEMO,VARCHAR,200)
      */
@@ -286,6 +299,22 @@ public class DynamicBaseScStation implements IBasePO<String> {
         this.updateTime = updateTime;
     }
 
+    public BigDecimal getIsUpload() {
+        return isUpload;
+    }
+
+    public void setIsUpload(BigDecimal isUpload) {
+        this.isUpload = isUpload;
+    }
+
+    public BigDecimal getIsInbatches() {
+        return isInbatches;
+    }
+
+    public void setIsInbatches(BigDecimal isInbatches) {
+        this.isInbatches = isInbatches;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -303,6 +332,8 @@ public class DynamicBaseScStation implements IBasePO<String> {
         sb.append(", recieverCode=").append(recieverCode);
         sb.append(", recieverName=").append(recieverName);
         sb.append(", recieverType=").append(recieverType);
+        sb.append(", isUpload=").append(isUpload);
+        sb.append(", isInbatches=").append(isInbatches);
         sb.append(", memo=").append(memo);
         sb.append(", validFlag=").append(validFlag);
         sb.append(", createManNo=").append(createManNo);

+ 0 - 1
src/main/java/com/jisco/dynamicweight/dynamicbasestationmaterial/controller/DynamicBaseStationMaterialController.java

@@ -1,7 +1,6 @@
 package com.jisco.dynamicweight.dynamicbasestationmaterial.controller;
 
 import cn.hutool.core.lang.Assert;
-import com.jisco.dynamicweight.dynamicbasemeterial.model.DynamicBaseMeterial;
 import com.jisco.dynamicweight.dynamicbasestationmaterial.model.DynamicBaseStationMaterial;
 import com.jisco.dynamicweight.dynamicbasestationmaterial.service.IDynamicBaseStationMaterialService;
 import com.jisco.dynamicweight.util.ExcelUtil;

+ 199 - 0
src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/controller/DynamicWorkAuditdataController.java

@@ -0,0 +1,199 @@
+package com.jisco.dynamicweight.dynamicworkauditdata.controller;
+
+import cn.hutool.core.lang.Assert;
+import com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata;
+import com.jisco.dynamicweight.dynamicworkauditdata.service.IDynamicWorkAuditdataService;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.AuditDataVO;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.DailyReportVO;
+import com.jisco.dynamicweight.util.ExcelUtil;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.format.DateTimeFormatter;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * DynamicWorkAuditdata RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-02-08 02:48
+ * 类描述
+ * 修订历史:
+ * 日期:2022-02-08
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicWorkAuditdata RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/dynamicworkauditdatas")
+public class DynamicWorkAuditdataController extends BaseRESTfulController {
+
+    @Autowired
+    IDynamicWorkAuditdataService dynamicWorkAuditdataService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dynamicworkauditdata:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DynamicWorkAuditdata> list = dynamicWorkAuditdataService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dynamicworkauditdata:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DynamicWorkAuditdata> list = dynamicWorkAuditdataService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据DynamicWorkAuditdata对象创建")
+    @ApiImplicitParam(name = "dynamicWorkAuditdata", value = "详细实体dynamicWorkAuditdata", required = true, dataType = "DynamicWorkAuditdata")
+    //@RequiresPermissions("dynamicworkauditdata:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute DynamicWorkAuditdata model){
+        DynamicWorkAuditdata dynamicWorkAuditdata = dynamicWorkAuditdataService.add(model);
+        return success(dynamicWorkAuditdata);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("dynamicworkauditdata:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        DynamicWorkAuditdata dynamicWorkAuditdata = dynamicWorkAuditdataService.getById(id);
+        return success(dynamicWorkAuditdata);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的dynamicWorkAuditdata信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "dynamicWorkAuditdata", value = "详细实体dynamicWorkAuditdata", required = true, dataType = "DynamicWorkAuditdata")
+    })
+    //@RequiresPermissions("dynamicworkauditdata:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody DynamicWorkAuditdata model){
+        model.setId(id);
+        DynamicWorkAuditdata dynamicWorkAuditdata = dynamicWorkAuditdataService.modify(model);
+        return success(dynamicWorkAuditdata);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("dynamicworkauditdata:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  dynamicWorkAuditdataService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value="审核", notes="动态秤数据审核")
+    @ApiImplicitParam(name = "list", value = "待审核数据", required = true, dataType = "List<AuditDataVO>")
+    @PostMapping(value = "/audit/{date}")
+    public RESTfulResult audit(@PathVariable String date, @RequestBody List<AuditDataVO> list){
+        Assert.isTrue(!CollectionUtils.isEmpty(list), "审核数据不能为空");
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            sdf.parse(date);
+        } catch (ParseException e) {
+            e.printStackTrace();
+            throw new RuntimeException("日期格式不正确(yyyy-MM-dd)");
+        }
+        dynamicWorkAuditdataService.audit(date, list);
+        return success("操作成功");
+    }
+
+    /**
+     * 查询上传数据
+     * @param auditingTime1
+     * @param auditingTime2
+     * @return
+     */
+    @GetMapping(value = "/getUploadData/{auditingTime1}/{auditingTime2}")
+    public RESTfulResult getUploadData(@PathVariable String auditingTime1, @PathVariable String auditingTime2){
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date startTime = null;
+        Date endTime = null;
+        try {
+            startTime = sdf.parse(auditingTime1);
+            endTime = sdf.parse(auditingTime2);
+        } catch (ParseException e) {
+            e.printStackTrace();
+            throw new RuntimeException("日期格式化错误");
+        }
+        List<DynamicWorkAuditdata> list = dynamicWorkAuditdataService.getUploadData(startTime, endTime);
+        return success(list);
+    }
+
+    /**
+     * 撤销审核的数据
+     * @param list
+     * @return
+     */
+    @ApiOperation(value = "撤销审核的数据", notes = "撤销审核的数据")
+    @PostMapping(value = "/cancelAudit")
+    public RESTfulResult cancelAudit(@RequestBody List<DynamicWorkAuditdata> list){
+        dynamicWorkAuditdataService.cancelAudit(list);
+        return success("审核数据撤销成功!");
+    }
+
+    @ApiOperation(value = "导出上传数据到Excel", notes = "导出上传数据到Excel")
+    @GetMapping(value = "/exportUploadDataExcel/{auditingTime1}/{auditingTime2}")
+    public void exportUploadDataExcel(HttpServletResponse response, @PathVariable String auditingTime1, @PathVariable String auditingTime2) throws IOException {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date startTime = null;
+        Date endTime = null;
+        try {
+            startTime = sdf.parse(auditingTime1);
+            endTime = sdf.parse(auditingTime2);
+        } catch (ParseException e) {
+            e.printStackTrace();
+            throw new RuntimeException("日期格式化错误");
+        }
+        List<DynamicWorkAuditdata> list = dynamicWorkAuditdataService.getUploadData(startTime, endTime);
+        ExcelUtil.exportExcel(response, list, DynamicWorkAuditdata.class, "上传数据");
+    }
+
+    @ApiOperation(value = "撤销上传的数据", notes = "撤销上传的数据")
+    @PostMapping(value = "/cancelUpload")
+    public RESTfulResult cancelUpload(@RequestBody List<DynamicWorkAuditdata> list){
+        dynamicWorkAuditdataService.cancelUpload(list);
+        return success("上传数据撤销成功!");
+    }
+
+    @ApiOperation(value = "数据上传", notes = "数据上传")
+    @PostMapping(value = "/upload")
+    public RESTfulResult upload(@RequestBody List<DynamicWorkAuditdata> list){
+        dynamicWorkAuditdataService.upload(list);
+        return success("数据上传成功!");
+    }
+}

+ 16 - 0
src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/mapper/DynamicWorkAuditdataMapper.java

@@ -0,0 +1,16 @@
+package com.jisco.dynamicweight.dynamicworkauditdata.mapper;
+
+import com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import java.util.Date;
+import java.util.List;
+
+@Mapper
+public interface DynamicWorkAuditdataMapper extends IBaseMapper<DynamicWorkAuditdata, String> {
+    void save(DynamicWorkAuditdata auditdata);
+
+    List<DynamicWorkAuditdata> getUploadData(@Param("auditingTime1") Date auditingTime1, @Param("auditingTime2") Date auditingTime2);
+
+}

+ 897 - 0
src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/mapper/DynamicWorkAuditdataMapper.xml

@@ -0,0 +1,897 @@
+<?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.jisco.dynamicweight.dynamicworkauditdata.mapper.DynamicWorkAuditdataMapper">
+    <resultMap id="BaseResultMap" type="com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata">
+        <id column="AUDITDATA_NO" jdbcType="VARCHAR" property="auditdataNo"/>
+        <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName"/>
+        <result column="MATERIAL_CODE" jdbcType="VARCHAR" property="materialCode"/>
+        <result column="STATION_NAME" jdbcType="VARCHAR" property="stationName"/>
+        <result column="STATION_CODE" jdbcType="VARCHAR" property="stationCode"/>
+        <result column="RECIEVER_NAME" jdbcType="VARCHAR" property="recieverName"/>
+        <result column="RECIEVER_CODE" jdbcType="VARCHAR" property="recieverCode"/>
+        <result column="SENDER_NAME" jdbcType="VARCHAR" property="senderName"/>
+        <result column="SENDER_CODE" jdbcType="VARCHAR" property="senderCode"/>
+        <result column="WEIGHT" jdbcType="DECIMAL" property="weight"/>
+        <result column="RECIEVER_TYPE" jdbcType="VARCHAR" property="recieverType"/>
+        <result column="SENDER_TYPE" jdbcType="VARCHAR" property="senderType"/>
+        <result column="UPLOADED" jdbcType="VARCHAR" property="uploaded"/>
+        <result column="START_TIME" jdbcType="TIMESTAMP" property="startTime"/>
+        <result column="END_TIME" jdbcType="TIMESTAMP" property="endTime"/>
+        <result column="MEMO" jdbcType="VARCHAR" property="memo"/>
+        <result column="AUDITING_MAN_NO" jdbcType="VARCHAR" property="auditingManNo"/>
+        <result column="ORIGINAL_VALUE" jdbcType="VARCHAR" property="originalValue"/>
+        <result column="SYSLOG" jdbcType="VARCHAR" property="syslog"/>
+        <result column="AUDITING_MAN_NAME" jdbcType="VARCHAR" property="auditingManName"/>
+        <result column="AUDITING_TIME" jdbcType="TIMESTAMP" property="auditingTime"/>
+        <result column="AUDITING_FLAG" jdbcType="VARCHAR" property="auditingFlag"/>
+        <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag"/>
+        <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo"/>
+        <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName"/>
+        <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo"/>
+        <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName"/>
+        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="PIKA_DATA_ID" jdbcType="VARCHAR" property="pikaDataId"/>
+    </resultMap>
+    <sql id="columns">
+        AUDITDATA_NO
+        , MATERIAL_NAME, MATERIAL_CODE, STATION_NAME, STATION_CODE, RECIEVER_NAME,
+    RECIEVER_CODE, SENDER_NAME, SENDER_CODE, WEIGHT, RECIEVER_TYPE, SENDER_TYPE, UPLOADED, 
+    START_TIME, END_TIME, MEMO, AUDITING_MAN_NO, ORIGINAL_VALUE, SYSLOG, AUDITING_MAN_NAME, 
+    AUDITING_TIME, AUDITING_FLAG, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
+    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, PIKA_DATA_ID
+    </sql>
+    <sql id="columns_alias">
+        t
+        .
+        AUDITDATA_NO
+        , t.MATERIAL_NAME, t.MATERIAL_CODE, t.STATION_NAME, t.STATION_CODE,
+    t.RECIEVER_NAME, t.RECIEVER_CODE, t.SENDER_NAME, t.SENDER_CODE, t.WEIGHT, t.RECIEVER_TYPE, 
+    t.SENDER_TYPE, t.UPLOADED, t.START_TIME, t.END_TIME, t.MEMO, t.AUDITING_MAN_NO, t.ORIGINAL_VALUE, 
+    t.SYSLOG, t.AUDITING_MAN_NAME, t.AUDITING_TIME, t.AUDITING_FLAG, t.VALID_FLAG, t.CREATE_MAN_NO, 
+    t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.PIKA_DATA_ID
+    </sql>
+    <sql id="select">
+        SELECT
+        <include refid="columns"/>
+        FROM DYNAMIC_WORK_AUDITDATA
+    </sql>
+    <sql id="select_alias">
+        SELECT
+        <include refid="columns_alias"/>
+        FROM DYNAMIC_WORK_AUDITDATA t
+    </sql>
+    <sql id="where">
+        <where>
+            <if test="auditdataNo != null and auditdataNo != ''">
+                and AUDITDATA_NO = #{auditdataNo}
+            </if>
+            <if test="materialName != null and materialName != ''">
+                and MATERIAL_NAME = #{materialName}
+            </if>
+            <if test="materialCode != null and materialCode != ''">
+                and MATERIAL_CODE = #{materialCode}
+            </if>
+            <if test="stationName != null and stationName != ''">
+                and STATION_NAME = #{stationName}
+            </if>
+            <if test="stationCode != null and stationCode != ''">
+                and STATION_CODE = #{stationCode}
+            </if>
+            <if test="recieverName != null and recieverName != ''">
+                and RECIEVER_NAME = #{recieverName}
+            </if>
+            <if test="recieverCode != null and recieverCode != ''">
+                and RECIEVER_CODE = #{recieverCode}
+            </if>
+            <if test="senderName != null and senderName != ''">
+                and SENDER_NAME = #{senderName}
+            </if>
+            <if test="senderCode != null and senderCode != ''">
+                and SENDER_CODE = #{senderCode}
+            </if>
+            <if test="weight != null">
+                and WEIGHT = #{weight}
+            </if>
+            <if test="recieverType != null and recieverType != ''">
+                and RECIEVER_TYPE = #{recieverType}
+            </if>
+            <if test="senderType != null and senderType != ''">
+                and SENDER_TYPE = #{senderType}
+            </if>
+            <if test="uploaded != null and uploaded != ''">
+                and UPLOADED = #{uploaded}
+            </if>
+            <if test="startTime != null">
+                and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
+            </if>
+            <if test="endTime != null">
+                and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
+            </if>
+            <if test="memo != null and memo != ''">
+                and MEMO = #{memo}
+            </if>
+            <if test="auditingManNo != null and auditingManNo != ''">
+                and AUDITING_MAN_NO = #{auditingManNo}
+            </if>
+            <if test="originalValue != null and originalValue != ''">
+                and ORIGINAL_VALUE = #{originalValue}
+            </if>
+            <if test="syslog != null and syslog != ''">
+                and SYSLOG = #{syslog}
+            </if>
+            <if test="auditingManName != null and auditingManName != ''">
+                and AUDITING_MAN_NAME = #{auditingManName}
+            </if>
+            <if test="auditingTime != null">
+                and TO_CHAR(AUDITING_TIME,'yyyy-MM-dd') = #{auditingTime}
+            </if>
+            <if test="auditingFlag != null and auditingFlag != ''">
+                and AUDITING_FLAG = #{auditingFlag}
+            </if>
+            <if test="validFlag != null and validFlag != ''">
+                and VALID_FLAG = #{validFlag}
+            </if>
+            <if test="createManNo != null and createManNo != ''">
+                and CREATE_MAN_NO = #{createManNo}
+            </if>
+            <if test="createManName != null and createManName != ''">
+                and CREATE_MAN_NAME = #{createManName}
+            </if>
+            <if test="createTime != null">
+                and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+            </if>
+            <if test="updateManNo != null and updateManNo != ''">
+                and UPDATE_MAN_NO = #{updateManNo}
+            </if>
+            <if test="updateManName != null and updateManName != ''">
+                and UPDATE_MAN_NAME = #{updateManName}
+            </if>
+            <if test="updateTime != null">
+                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+            </if>
+            <if test="pikaDataId != null">
+                and PIKA_DATA_ID = #{pikaDataId}
+            </if>
+        </where>
+    </sql>
+    <sql id="whereLike">
+        <where>
+            <if test="auditdataNo != null and auditdataNo != ''">
+                and AUDITDATA_NO LIKE '%${auditdataNo}%'
+            </if>
+            <if test="materialName != null and materialName != ''">
+                and MATERIAL_NAME LIKE '%${materialName}%'
+            </if>
+            <if test="materialCode != null and materialCode != ''">
+                and MATERIAL_CODE LIKE '%${materialCode}%'
+            </if>
+            <if test="stationName != null and stationName != ''">
+                and STATION_NAME LIKE '%${stationName}%'
+            </if>
+            <if test="stationCode != null and stationCode != ''">
+                and STATION_CODE LIKE '%${stationCode}%'
+            </if>
+            <if test="recieverName != null and recieverName != ''">
+                and RECIEVER_NAME LIKE '%${recieverName}%'
+            </if>
+            <if test="recieverCode != null and recieverCode != ''">
+                and RECIEVER_CODE LIKE '%${recieverCode}%'
+            </if>
+            <if test="senderName != null and senderName != ''">
+                and SENDER_NAME LIKE '%${senderName}%'
+            </if>
+            <if test="senderCode != null and senderCode != ''">
+                and SENDER_CODE LIKE '%${senderCode}%'
+            </if>
+            <if test="weight != null">
+                and WEIGHT = #{weight}
+            </if>
+            <if test="recieverType != null and recieverType != ''">
+                and RECIEVER_TYPE LIKE '%${recieverType}%'
+            </if>
+            <if test="senderType != null and senderType != ''">
+                and SENDER_TYPE LIKE '%${senderType}%'
+            </if>
+            <if test="uploaded != null and uploaded != ''">
+                and UPLOADED LIKE '%${uploaded}%'
+            </if>
+            <if test="startTime != null">
+                and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
+            </if>
+            <if test="endTime != null">
+                and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
+            </if>
+            <if test="memo != null and memo != ''">
+                and MEMO LIKE '%${memo}%'
+            </if>
+            <if test="auditingManNo != null and auditingManNo != ''">
+                and AUDITING_MAN_NO LIKE '%${auditingManNo}%'
+            </if>
+            <if test="originalValue != null and originalValue != ''">
+                and ORIGINAL_VALUE LIKE '%${originalValue}%'
+            </if>
+            <if test="syslog != null and syslog != ''">
+                and SYSLOG LIKE '%${syslog}%'
+            </if>
+            <if test="auditingManName != null and auditingManName != ''">
+                and AUDITING_MAN_NAME LIKE '%${auditingManName}%'
+            </if>
+            <if test="auditingTime != null">
+                and TO_CHAR(AUDITING_TIME,'yyyy-MM-dd') = #{auditingTime}
+            </if>
+            <if test="auditingFlag != null and auditingFlag != ''">
+                and AUDITING_FLAG LIKE '%${auditingFlag}%'
+            </if>
+            <if test="validFlag != null and validFlag != ''">
+                and VALID_FLAG LIKE '%${validFlag}%'
+            </if>
+            <if test="createManNo != null and createManNo != ''">
+                and CREATE_MAN_NO LIKE '%${createManNo}%'
+            </if>
+            <if test="createManName != null and createManName != ''">
+                and CREATE_MAN_NAME LIKE '%${createManName}%'
+            </if>
+            <if test="createTime != null">
+                and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+            </if>
+            <if test="updateManNo != null and updateManNo != ''">
+                and UPDATE_MAN_NO LIKE '%${updateManNo}%'
+            </if>
+            <if test="updateManName != null and updateManName != ''">
+                and UPDATE_MAN_NAME LIKE '%${updateManName}%'
+            </if>
+            <if test="updateTime != null">
+                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+            </if>
+            <if test="pikaDataId != null">
+                and PIKA_DATA_ID = #{pikaDataId}
+            </if>
+        </where>
+    </sql>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+        delete
+        from DYNAMIC_WORK_AUDITDATA
+        where AUDITDATA_NO = #{auditdataNo,jdbcType=VARCHAR}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from DYNAMIC_WORK_AUDITDATA
+        where 1!=1
+        <if test="materialName != null and materialName != ''">
+            or MATERIAL_NAME = #{materialName}
+        </if>
+        <if test="materialCode != null and materialCode != ''">
+            or MATERIAL_CODE = #{materialCode}
+        </if>
+        <if test="stationName != null and stationName != ''">
+            or STATION_NAME = #{stationName}
+        </if>
+        <if test="stationCode != null and stationCode != ''">
+            or STATION_CODE = #{stationCode}
+        </if>
+        <if test="recieverName != null and recieverName != ''">
+            or RECIEVER_NAME = #{recieverName}
+        </if>
+        <if test="recieverCode != null and recieverCode != ''">
+            or RECIEVER_CODE = #{recieverCode}
+        </if>
+        <if test="senderName != null and senderName != ''">
+            or SENDER_NAME = #{senderName}
+        </if>
+        <if test="senderCode != null and senderCode != ''">
+            or SENDER_CODE = #{senderCode}
+        </if>
+        <if test="weight != null">
+            or WEIGHT = #{weight}
+        </if>
+        <if test="recieverType != null and recieverType != ''">
+            or RECIEVER_TYPE = #{recieverType}
+        </if>
+        <if test="senderType != null and senderType != ''">
+            or SENDER_TYPE = #{senderType}
+        </if>
+        <if test="uploaded != null and uploaded != ''">
+            or UPLOADED = #{uploaded}
+        </if>
+        <if test="startTime != null">
+            or TO_CHAR(START_TIME,'yyyy-MM-dd') = '#{startTime}'
+        </if>
+        <if test="endTime != null">
+            or TO_CHAR(END_TIME,'yyyy-MM-dd') = '#{endTime}'
+        </if>
+        <if test="memo != null and memo != ''">
+            or MEMO = #{memo}
+        </if>
+        <if test="auditingManNo != null and auditingManNo != ''">
+            or AUDITING_MAN_NO = #{auditingManNo}
+        </if>
+        <if test="originalValue != null and originalValue != ''">
+            or ORIGINAL_VALUE = #{originalValue}
+        </if>
+        <if test="syslog != null and syslog != ''">
+            or SYSLOG = #{syslog}
+        </if>
+        <if test="auditingManName != null and auditingManName != ''">
+            or AUDITING_MAN_NAME = #{auditingManName}
+        </if>
+        <if test="auditingTime != null">
+            or TO_CHAR(AUDITING_TIME,'yyyy-MM-dd') = '#{auditingTime}'
+        </if>
+        <if test="auditingFlag != null and auditingFlag != ''">
+            or AUDITING_FLAG = #{auditingFlag}
+        </if>
+        <if test="validFlag != null and validFlag != ''">
+            or VALID_FLAG = #{validFlag}
+        </if>
+        <if test="createManNo != null and createManNo != ''">
+            or CREATE_MAN_NO = #{createManNo}
+        </if>
+        <if test="createManName != null and createManName != ''">
+            or CREATE_MAN_NAME = #{createManName}
+        </if>
+        <if test="createTime != null">
+            or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+        </if>
+        <if test="updateManNo != null and updateManNo != ''">
+            or UPDATE_MAN_NO = #{updateManNo}
+        </if>
+        <if test="updateManName != null and updateManName != ''">
+            or UPDATE_MAN_NAME = #{updateManName}
+        </if>
+        <if test="updateTime != null">
+            or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+        </if>
+        <if test="pikaDataId != null">
+            or PIKA_DATA_ID = #{pikaDataId}
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata">
+        insert into DYNAMIC_WORK_AUDITDATA (AUDITDATA_NO, MATERIAL_NAME, MATERIAL_CODE,
+                                            STATION_NAME, STATION_CODE, RECIEVER_NAME,
+                                            RECIEVER_CODE, SENDER_NAME, SENDER_CODE,
+                                            WEIGHT, RECIEVER_TYPE, SENDER_TYPE,
+                                            UPLOADED, START_TIME, END_TIME,
+                                            MEMO, AUDITING_MAN_NO, ORIGINAL_VALUE,
+                                            SYSLOG, AUDITING_MAN_NAME, AUDITING_TIME,
+                                            AUDITING_FLAG, VALID_FLAG, CREATE_MAN_NO,
+                                            CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO,
+                                            UPDATE_MAN_NAME, UPDATE_TIME, PIKA_DATA_ID)
+        values (#{auditdataNo,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, #{materialCode,jdbcType=VARCHAR},
+                #{stationName,jdbcType=VARCHAR}, #{stationCode,jdbcType=VARCHAR}, #{recieverName,jdbcType=VARCHAR},
+                #{recieverCode,jdbcType=VARCHAR}, #{senderName,jdbcType=VARCHAR}, #{senderCode,jdbcType=VARCHAR},
+                #{weight,jdbcType=DECIMAL}, #{recieverType,jdbcType=VARCHAR}, #{senderType,jdbcType=VARCHAR},
+                #{uploaded,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
+                #{memo,jdbcType=VARCHAR}, #{auditingManNo,jdbcType=VARCHAR}, #{originalValue,jdbcType=VARCHAR},
+                #{syslog,jdbcType=VARCHAR}, #{auditingManName,jdbcType=VARCHAR}, #{auditingTime,jdbcType=TIMESTAMP},
+                #{auditingFlag,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR},
+                #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR},
+                #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{pikaDataId,jdbcType=VARCHAR})
+    </insert>
+    <insert id="insertSelective"
+            parameterType="com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata">
+        insert into DYNAMIC_WORK_AUDITDATA
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="auditdataNo != null">
+                AUDITDATA_NO,
+            </if>
+            <if test="materialName != null">
+                MATERIAL_NAME,
+            </if>
+            <if test="materialCode != null">
+                MATERIAL_CODE,
+            </if>
+            <if test="stationName != null">
+                STATION_NAME,
+            </if>
+            <if test="stationCode != null">
+                STATION_CODE,
+            </if>
+            <if test="recieverName != null">
+                RECIEVER_NAME,
+            </if>
+            <if test="recieverCode != null">
+                RECIEVER_CODE,
+            </if>
+            <if test="senderName != null">
+                SENDER_NAME,
+            </if>
+            <if test="senderCode != null">
+                SENDER_CODE,
+            </if>
+            <if test="weight != null">
+                WEIGHT,
+            </if>
+            <if test="recieverType != null">
+                RECIEVER_TYPE,
+            </if>
+            <if test="senderType != null">
+                SENDER_TYPE,
+            </if>
+            <if test="uploaded != null">
+                UPLOADED,
+            </if>
+            <if test="startTime != null">
+                START_TIME,
+            </if>
+            <if test="endTime != null">
+                END_TIME,
+            </if>
+            <if test="memo != null">
+                MEMO,
+            </if>
+            <if test="auditingManNo != null">
+                AUDITING_MAN_NO,
+            </if>
+            <if test="originalValue != null">
+                ORIGINAL_VALUE,
+            </if>
+            <if test="syslog != null">
+                SYSLOG,
+            </if>
+            <if test="auditingManName != null">
+                AUDITING_MAN_NAME,
+            </if>
+            <if test="auditingTime != null">
+                AUDITING_TIME,
+            </if>
+            <if test="auditingFlag != null">
+                AUDITING_FLAG,
+            </if>
+            <if test="validFlag != null">
+                VALID_FLAG,
+            </if>
+            <if test="createManNo != null">
+                CREATE_MAN_NO,
+            </if>
+            <if test="createManName != null">
+                CREATE_MAN_NAME,
+            </if>
+            <if test="createTime != null">
+                CREATE_TIME,
+            </if>
+            <if test="updateManNo != null">
+                UPDATE_MAN_NO,
+            </if>
+            <if test="updateManName != null">
+                UPDATE_MAN_NAME,
+            </if>
+            <if test="updateTime != null">
+                UPDATE_TIME,
+            </if>
+            <if test="pikaDataId != null">
+                PIKA_DATA_ID,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="auditdataNo != null">
+                #{auditdataNo,jdbcType=VARCHAR},
+            </if>
+            <if test="materialName != null">
+                #{materialName,jdbcType=VARCHAR},
+            </if>
+            <if test="materialCode != null">
+                #{materialCode,jdbcType=VARCHAR},
+            </if>
+            <if test="stationName != null">
+                #{stationName,jdbcType=VARCHAR},
+            </if>
+            <if test="stationCode != null">
+                #{stationCode,jdbcType=VARCHAR},
+            </if>
+            <if test="recieverName != null">
+                #{recieverName,jdbcType=VARCHAR},
+            </if>
+            <if test="recieverCode != null">
+                #{recieverCode,jdbcType=VARCHAR},
+            </if>
+            <if test="senderName != null">
+                #{senderName,jdbcType=VARCHAR},
+            </if>
+            <if test="senderCode != null">
+                #{senderCode,jdbcType=VARCHAR},
+            </if>
+            <if test="weight != null">
+                #{weight,jdbcType=DECIMAL},
+            </if>
+            <if test="recieverType != null">
+                #{recieverType,jdbcType=VARCHAR},
+            </if>
+            <if test="senderType != null">
+                #{senderType,jdbcType=VARCHAR},
+            </if>
+            <if test="uploaded != null">
+                #{uploaded,jdbcType=VARCHAR},
+            </if>
+            <if test="startTime != null">
+                #{startTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="endTime != null">
+                #{endTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="memo != null">
+                #{memo,jdbcType=VARCHAR},
+            </if>
+            <if test="auditingManNo != null">
+                #{auditingManNo,jdbcType=VARCHAR},
+            </if>
+            <if test="originalValue != null">
+                #{originalValue,jdbcType=VARCHAR},
+            </if>
+            <if test="syslog != null">
+                #{syslog,jdbcType=VARCHAR},
+            </if>
+            <if test="auditingManName != null">
+                #{auditingManName,jdbcType=VARCHAR},
+            </if>
+            <if test="auditingTime != null">
+                #{auditingTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="auditingFlag != null">
+                #{auditingFlag,jdbcType=VARCHAR},
+            </if>
+            <if test="validFlag != null">
+                #{validFlag,jdbcType=VARCHAR},
+            </if>
+            <if test="createManNo != null">
+                #{createManNo,jdbcType=VARCHAR},
+            </if>
+            <if test="createManName != null">
+                #{createManName,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateManNo != null">
+                #{updateManNo,jdbcType=VARCHAR},
+            </if>
+            <if test="updateManName != null">
+                #{updateManName,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="pikaDataId != null">
+                #{pikaDataId,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKey"
+            parameterType="com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata">
+        update DYNAMIC_WORK_AUDITDATA
+        set MATERIAL_NAME     = #{materialName,jdbcType=VARCHAR},
+            MATERIAL_CODE     = #{materialCode,jdbcType=VARCHAR},
+            STATION_NAME      = #{stationName,jdbcType=VARCHAR},
+            STATION_CODE      = #{stationCode,jdbcType=VARCHAR},
+            RECIEVER_NAME     = #{recieverName,jdbcType=VARCHAR},
+            RECIEVER_CODE     = #{recieverCode,jdbcType=VARCHAR},
+            SENDER_NAME       = #{senderName,jdbcType=VARCHAR},
+            SENDER_CODE       = #{senderCode,jdbcType=VARCHAR},
+            WEIGHT            = #{weight,jdbcType=DECIMAL},
+            RECIEVER_TYPE     = #{recieverType,jdbcType=VARCHAR},
+            SENDER_TYPE       = #{senderType,jdbcType=VARCHAR},
+            UPLOADED          = #{uploaded,jdbcType=VARCHAR},
+            START_TIME        = #{startTime,jdbcType=TIMESTAMP},
+            END_TIME          = #{endTime,jdbcType=TIMESTAMP},
+            MEMO              = #{memo,jdbcType=VARCHAR},
+            AUDITING_MAN_NO   = #{auditingManNo,jdbcType=VARCHAR},
+            ORIGINAL_VALUE    = #{originalValue,jdbcType=VARCHAR},
+            SYSLOG            = #{syslog,jdbcType=VARCHAR},
+            AUDITING_MAN_NAME = #{auditingManName,jdbcType=VARCHAR},
+            AUDITING_TIME     = #{auditingTime,jdbcType=TIMESTAMP},
+            AUDITING_FLAG     = #{auditingFlag,jdbcType=VARCHAR},
+            VALID_FLAG        = #{validFlag,jdbcType=VARCHAR},
+            CREATE_MAN_NO     = #{createManNo,jdbcType=VARCHAR},
+            CREATE_MAN_NAME   = #{createManName,jdbcType=VARCHAR},
+            CREATE_TIME       = #{createTime,jdbcType=TIMESTAMP},
+            UPDATE_MAN_NO     = #{updateManNo,jdbcType=VARCHAR},
+            UPDATE_MAN_NAME   = #{updateManName,jdbcType=VARCHAR},
+            UPDATE_TIME       = #{updateTime,jdbcType=TIMESTAMP},
+            PIKA_DATA_ID       = #{pikaDataId,jdbcType=TIMESTAMP}
+        where AUDITDATA_NO = #{auditdataNo,jdbcType=VARCHAR}
+    </update>
+    <update id="updateByPrimaryKeySelective"
+            parameterType="com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata">
+        update DYNAMIC_WORK_AUDITDATA
+        <set>
+            <if test="materialName != null">
+                MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
+            </if>
+            <if test="materialCode != null">
+                MATERIAL_CODE = #{materialCode,jdbcType=VARCHAR},
+            </if>
+            <if test="stationName != null">
+                STATION_NAME = #{stationName,jdbcType=VARCHAR},
+            </if>
+            <if test="stationCode != null">
+                STATION_CODE = #{stationCode,jdbcType=VARCHAR},
+            </if>
+            <if test="recieverName != null">
+                RECIEVER_NAME = #{recieverName,jdbcType=VARCHAR},
+            </if>
+            <if test="recieverCode != null">
+                RECIEVER_CODE = #{recieverCode,jdbcType=VARCHAR},
+            </if>
+            <if test="senderName != null">
+                SENDER_NAME = #{senderName,jdbcType=VARCHAR},
+            </if>
+            <if test="senderCode != null">
+                SENDER_CODE = #{senderCode,jdbcType=VARCHAR},
+            </if>
+            <if test="weight != null">
+                WEIGHT = #{weight,jdbcType=DECIMAL},
+            </if>
+            <if test="recieverType != null">
+                RECIEVER_TYPE = #{recieverType,jdbcType=VARCHAR},
+            </if>
+            <if test="senderType != null">
+                SENDER_TYPE = #{senderType,jdbcType=VARCHAR},
+            </if>
+            <if test="uploaded != null">
+                UPLOADED = #{uploaded,jdbcType=VARCHAR},
+            </if>
+            <if test="startTime != null">
+                START_TIME = #{startTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="endTime != null">
+                END_TIME = #{endTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="memo != null">
+                MEMO = #{memo,jdbcType=VARCHAR},
+            </if>
+            <if test="auditingManNo != null">
+                AUDITING_MAN_NO = #{auditingManNo,jdbcType=VARCHAR},
+            </if>
+            <if test="originalValue != null">
+                ORIGINAL_VALUE = #{originalValue,jdbcType=VARCHAR},
+            </if>
+            <if test="syslog != null">
+                SYSLOG = #{syslog,jdbcType=VARCHAR},
+            </if>
+            <if test="auditingManName != null">
+                AUDITING_MAN_NAME = #{auditingManName,jdbcType=VARCHAR},
+            </if>
+            <if test="auditingTime != null">
+                AUDITING_TIME = #{auditingTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="auditingFlag != null">
+                AUDITING_FLAG = #{auditingFlag,jdbcType=VARCHAR},
+            </if>
+            <if test="validFlag != null">
+                VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
+            </if>
+            <if test="createManNo != null">
+                CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+            </if>
+            <if test="createManName != null">
+                CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateManNo != null">
+                UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+            </if>
+            <if test="updateManName != null">
+                UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="pikaDataId != null">
+                PIKA_DATA_ID = #{pikaDataId,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where AUDITDATA_NO = #{auditdataNo,jdbcType=VARCHAR}
+    </update>
+    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+        <include refid="select"/>
+        where AUDITDATA_NO = #{auditdataNo,jdbcType=VARCHAR}
+    </select>
+    <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+        <include refid="select"/>
+        <include refid="where"/>
+    </select>
+    <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+        <include refid="select"/>
+        <include refid="whereLike"/>
+    </select>
+    <insert id="batchInsert" parameterType="java.util.List">
+        insert into DYNAMIC_WORK_AUDITDATA
+        (AUDITDATA_NO,
+        MATERIAL_NAME, MATERIAL_CODE, STATION_NAME,
+        STATION_CODE, RECIEVER_NAME, RECIEVER_CODE,
+        SENDER_NAME, SENDER_CODE, WEIGHT,
+        RECIEVER_TYPE, SENDER_TYPE, UPLOADED,
+        START_TIME, END_TIME, MEMO,
+        AUDITING_MAN_NO, ORIGINAL_VALUE,
+        SYSLOG, AUDITING_MAN_NAME, AUDITING_TIME,
+        AUDITING_FLAG, VALID_FLAG, CREATE_MAN_NO,
+        CREATE_MAN_NAME, CREATE_TIME,
+        UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, PIKA_DATA_ID
+        )
+        ( <foreach collection="list" item="item" separator="union all">
+        select
+        #{item.auditdataNo,jdbcType=VARCHAR},
+        #{item.materialName,jdbcType=VARCHAR}, #{item.materialCode,jdbcType=VARCHAR},
+        #{item.stationName,jdbcType=VARCHAR},
+        #{item.stationCode,jdbcType=VARCHAR}, #{item.recieverName,jdbcType=VARCHAR},
+        #{item.recieverCode,jdbcType=VARCHAR},
+        #{item.senderName,jdbcType=VARCHAR}, #{item.senderCode,jdbcType=VARCHAR}, #{item.weight,jdbcType=DECIMAL},
+        #{item.recieverType,jdbcType=VARCHAR}, #{item.senderType,jdbcType=VARCHAR}, #{item.uploaded,jdbcType=VARCHAR},
+        #{item.startTime,jdbcType=TIMESTAMP}, #{item.endTime,jdbcType=TIMESTAMP}, #{item.memo,jdbcType=VARCHAR},
+        #{item.auditingManNo,jdbcType=VARCHAR}, #{item.originalValue,jdbcType=VARCHAR},
+        #{item.syslog,jdbcType=VARCHAR}, #{item.auditingManName,jdbcType=VARCHAR},
+        #{item.auditingTime,jdbcType=TIMESTAMP},
+        #{item.auditingFlag,jdbcType=VARCHAR}, #{item.validFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR},
+        #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
+        #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR},
+        #{item.updateTime,jdbcType=TIMESTAMP, #{pikaDataId,jdbcType=VARCHAR}}
+        from dual
+    </foreach> )
+    </insert>
+    <update id="batchUpdate" parameterType="java.util.List">
+        update DYNAMIC_WORK_AUDITDATA
+        set
+        AUDITDATA_NO=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.auditdataNo,jdbcType=VARCHAR}
+        </foreach>
+        ,MATERIAL_NAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.materialName,jdbcType=VARCHAR}
+        </foreach>
+        ,MATERIAL_CODE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.materialCode,jdbcType=VARCHAR}
+        </foreach>
+        ,STATION_NAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.stationName,jdbcType=VARCHAR}
+        </foreach>
+        ,STATION_CODE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.stationCode,jdbcType=VARCHAR}
+        </foreach>
+        ,RECIEVER_NAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.recieverName,jdbcType=VARCHAR}
+        </foreach>
+        ,RECIEVER_CODE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.recieverCode,jdbcType=VARCHAR}
+        </foreach>
+        ,SENDER_NAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.senderName,jdbcType=VARCHAR}
+        </foreach>
+        ,SENDER_CODE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.senderCode,jdbcType=VARCHAR}
+        </foreach>
+        ,WEIGHT=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.weight,jdbcType=DECIMAL}
+        </foreach>
+        ,RECIEVER_TYPE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.recieverType,jdbcType=VARCHAR}
+        </foreach>
+        ,SENDER_TYPE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.senderType,jdbcType=VARCHAR}
+        </foreach>
+        ,UPLOADED=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.uploaded,jdbcType=VARCHAR}
+        </foreach>
+        ,START_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.startTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,END_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.endTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,MEMO=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
+        </foreach>
+        ,AUDITING_MAN_NO=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.auditingManNo,jdbcType=VARCHAR}
+        </foreach>
+        ,ORIGINAL_VALUE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.originalValue,jdbcType=VARCHAR}
+        </foreach>
+        ,SYSLOG=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.syslog,jdbcType=VARCHAR}
+        </foreach>
+        ,AUDITING_MAN_NAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.auditingManName,jdbcType=VARCHAR}
+        </foreach>
+        ,AUDITING_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.auditingTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,AUDITING_FLAG=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.auditingFlag,jdbcType=VARCHAR}
+        </foreach>
+        ,VALID_FLAG=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
+        </foreach>
+        ,CREATE_MAN_NO=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
+        </foreach>
+        ,CREATE_MAN_NAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
+        </foreach>
+        ,CREATE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,UPDATE_MAN_NO=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
+        </foreach>
+        ,UPDATE_MAN_NAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
+        </foreach>
+        ,UPDATE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,PIKA_DATA_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case AUDITDATA_NO" close="end">
+            when #{item.auditdataNo,jdbcType=VARCHAR} then #{item.pikaDataId,jdbcType=VARCHAR}
+        </foreach>
+        where AUDITDATA_NO in
+        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+            #{item.auditdataNo,jdbcType=VARCHAR}
+        </foreach>
+    </update>
+    <delete id="batchDelete" parameterType="java.util.List">
+        delete from DYNAMIC_WORK_AUDITDATA
+        where AUDITDATA_NO in
+        <foreach collection="list" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+    </delete>
+    <!-- 友情提示!!!-->
+    <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+    <insert id="save">
+        insert into DYNAMIC_WORK_AUDITDATA (AUDITDATA_NO, MATERIAL_NAME, MATERIAL_CODE,
+                                            STATION_NAME, STATION_CODE, RECIEVER_NAME,
+                                            RECIEVER_CODE, SENDER_NAME, SENDER_CODE,
+                                            WEIGHT, RECIEVER_TYPE, SENDER_TYPE,
+                                            UPLOADED, START_TIME, END_TIME,
+                                            MEMO, AUDITING_MAN_NO, ORIGINAL_VALUE,
+                                            SYSLOG, AUDITING_MAN_NAME, AUDITING_TIME,
+                                            AUDITING_FLAG, VALID_FLAG, CREATE_MAN_NO,
+                                            CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO,
+                                            UPDATE_MAN_NAME, UPDATE_TIME, PIKA_DATA_ID)
+        values (SEQ_DYNAMIC_WORK_AUDITDATA.NEXTVAL, #{materialName,jdbcType=VARCHAR}, #{materialCode,jdbcType=VARCHAR},
+                #{stationName,jdbcType=VARCHAR}, #{stationCode,jdbcType=VARCHAR}, #{recieverName,jdbcType=VARCHAR},
+                #{recieverCode,jdbcType=VARCHAR}, #{senderName,jdbcType=VARCHAR}, #{senderCode,jdbcType=VARCHAR},
+                #{weight,jdbcType=DECIMAL}, #{recieverType,jdbcType=VARCHAR}, #{senderType,jdbcType=VARCHAR},
+                #{uploaded,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
+                #{memo,jdbcType=VARCHAR}, #{auditingManNo,jdbcType=VARCHAR}, #{originalValue,jdbcType=VARCHAR},
+                #{syslog,jdbcType=VARCHAR}, #{auditingManName,jdbcType=VARCHAR}, #{auditingTime,jdbcType=TIMESTAMP},
+                #{auditingFlag,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR},
+                #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR},
+                #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{pikaDataId,jdbcType=VARCHAR})
+    </insert>
+
+    <select id="getUploadData" resultMap="BaseResultMap">
+        <include refid="select"/>
+        where AUDITING_TIME &gt;= #{auditingTime1}
+        and AUDITING_TIME &lt;= #{auditingTime2}
+    </select>
+</mapper>

+ 484 - 0
src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/model/DynamicWorkAuditdata.java

@@ -0,0 +1,484 @@
+package com.jisco.dynamicweight.dynamicworkauditdata.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="动态秤称重数据")
+public class DynamicWorkAuditdata implements IBasePO<String> {
+    /**
+     * 系统编号(AUDITDATA_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="系统编号",required=true)
+    private String auditdataNo;
+
+    /**
+     * 物料名称(MATERIAL_NAME,VARCHAR,60)
+     */
+    @ApiModelProperty(value="物料名称",required=false)
+    private String materialName;
+
+    /**
+     * 物料编码(MATERIAL_CODE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="物料编码",required=false)
+    private String materialCode;
+
+    /**
+     * 站点名称(STATION_NAME,VARCHAR,60)
+     */
+    @ApiModelProperty(value="站点名称",required=false)
+    private String stationName;
+
+    /**
+     * 站点编码(STATION_CODE,VARCHAR,60)
+     */
+    @ApiModelProperty(value="站点编码",required=false)
+    private String stationCode;
+
+    /**
+     * 收货库房(RECIEVER_NAME,VARCHAR,60)
+     */
+    @ApiModelProperty(value="收货库房",required=false)
+    private String recieverName;
+
+    /**
+     * 收货库房编码(RECIEVER_CODE,VARCHAR,60)
+     */
+    @ApiModelProperty(value="收货库房编码",required=false)
+    private String recieverCode;
+
+    /**
+     * 发货库房(SENDER_NAME,VARCHAR,60)
+     */
+    @ApiModelProperty(value="发货库房",required=false)
+    private String senderName;
+
+    /**
+     * 发货库房编码(SENDER_CODE,VARCHAR,60)
+     */
+    @ApiModelProperty(value="发货库房编码",required=false)
+    private String senderCode;
+
+    /**
+     * 重量(WEIGHT,DECIMAL,16)
+     */
+    @ApiModelProperty(value="重量",required=false)
+    private BigDecimal weight;
+
+    /**
+     * 收货点类型(RECIEVER_TYPE,VARCHAR,60)
+     */
+    @ApiModelProperty(value="收货点类型",required=false)
+    private String recieverType;
+
+    /**
+     * 发货点类型(SENDER_TYPE,VARCHAR,60)
+     */
+    @ApiModelProperty(value="发货点类型",required=false)
+    private String senderType;
+
+    /**
+     * 上传标志(UPLOADED,VARCHAR,1)
+     */
+    @ApiModelProperty(value="上传标志",required=false)
+    private String uploaded;
+
+    /**
+     * 开始时间(START_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="开始时间",required=false)
+    private Date startTime;
+
+    /**
+     * 结束时间(END_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="结束时间",required=false)
+    private Date endTime;
+
+    /**
+     * 备注(MEMO,VARCHAR,100)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String memo;
+
+    /**
+     * 审核人编号(AUDITING_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="审核人编号",required=false)
+    private String auditingManNo;
+
+    /**
+     * 原始记录(ORIGINAL_VALUE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="原始记录",required=false)
+    private String originalValue;
+
+    /**
+     * 系统修改日志(SYSLOG,VARCHAR,2000)
+     */
+    @ApiModelProperty(value="系统修改日志",required=false)
+    private String syslog;
+
+    /**
+     * 审核人姓名(AUDITING_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="审核人姓名",required=false)
+    private String auditingManName;
+
+    /**
+     * 审核时间(AUDITING_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="审核时间",required=false)
+    private Date auditingTime;
+
+    /**
+     * 审核标识(AUDITING_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="审核标识",required=false)
+    private String auditingFlag;
+
+    /**
+     * 状态(0:无效;1:有效)(VALID_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="状态(0:无效;1:有效)",required=true)
+    private String validFlag;
+
+    /**
+     * 创建人编号(CREATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="创建人编号",required=true)
+    private String createManNo;
+
+    /**
+     * 创建人姓名(CREATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="创建人姓名",required=true)
+    private String createManName;
+
+    /**
+     * 创建时间(YYYY-MM-DD HH:mm:SS)(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建时间(YYYY-MM-DD HH:mm:SS)",required=true)
+    private Date createTime;
+
+    /**
+     * 修改人编号(UPDATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="修改人编号",required=false)
+    private String updateManNo;
+
+    /**
+     * 修改人姓名(UPDATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改人姓名",required=false)
+    private String updateManName;
+
+    /**
+     * 修改时间(YYYY-MM-DD HH:mm:SS)(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间(YYYY-MM-DD HH:mm:SS)",required=false)
+    private Date updateTime;
+
+    /**
+     * 上传皮卡系统ID
+     */
+    @ApiModelProperty(value="上传皮卡系统ID",required=false)
+    private String pikaDataId;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.auditdataNo;
+    }
+
+    @Override
+    public void setId(String auditdataNo) {
+        this.auditdataNo = auditdataNo == null ? null : auditdataNo.trim();
+    }
+
+    public String getAuditdataNo() {
+        return auditdataNo;
+    }
+
+    public void setAuditdataNo(String auditdataNo) {
+        this.auditdataNo = auditdataNo == null ? null : auditdataNo.trim();
+    }
+
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName == null ? null : materialName.trim();
+    }
+
+    public String getMaterialCode() {
+        return materialCode;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode == null ? null : materialCode.trim();
+    }
+
+    public String getStationName() {
+        return stationName;
+    }
+
+    public void setStationName(String stationName) {
+        this.stationName = stationName == null ? null : stationName.trim();
+    }
+
+    public String getStationCode() {
+        return stationCode;
+    }
+
+    public void setStationCode(String stationCode) {
+        this.stationCode = stationCode == null ? null : stationCode.trim();
+    }
+
+    public String getRecieverName() {
+        return recieverName;
+    }
+
+    public void setRecieverName(String recieverName) {
+        this.recieverName = recieverName == null ? null : recieverName.trim();
+    }
+
+    public String getRecieverCode() {
+        return recieverCode;
+    }
+
+    public void setRecieverCode(String recieverCode) {
+        this.recieverCode = recieverCode == null ? null : recieverCode.trim();
+    }
+
+    public String getSenderName() {
+        return senderName;
+    }
+
+    public void setSenderName(String senderName) {
+        this.senderName = senderName == null ? null : senderName.trim();
+    }
+
+    public String getSenderCode() {
+        return senderCode;
+    }
+
+    public void setSenderCode(String senderCode) {
+        this.senderCode = senderCode == null ? null : senderCode.trim();
+    }
+
+    public BigDecimal getWeight() {
+        return weight;
+    }
+
+    public void setWeight(BigDecimal weight) {
+        this.weight = weight;
+    }
+
+    public String getRecieverType() {
+        return recieverType;
+    }
+
+    public void setRecieverType(String recieverType) {
+        this.recieverType = recieverType == null ? null : recieverType.trim();
+    }
+
+    public String getSenderType() {
+        return senderType;
+    }
+
+    public void setSenderType(String senderType) {
+        this.senderType = senderType == null ? null : senderType.trim();
+    }
+
+    public String getUploaded() {
+        return uploaded;
+    }
+
+    public void setUploaded(String uploaded) {
+        this.uploaded = uploaded == null ? null : uploaded.trim();
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.trim();
+    }
+
+    public String getAuditingManNo() {
+        return auditingManNo;
+    }
+
+    public void setAuditingManNo(String auditingManNo) {
+        this.auditingManNo = auditingManNo == null ? null : auditingManNo.trim();
+    }
+
+    public String getOriginalValue() {
+        return originalValue;
+    }
+
+    public void setOriginalValue(String originalValue) {
+        this.originalValue = originalValue == null ? null : originalValue.trim();
+    }
+
+    public String getSyslog() {
+        return syslog;
+    }
+
+    public void setSyslog(String syslog) {
+        this.syslog = syslog == null ? null : syslog.trim();
+    }
+
+    public String getAuditingManName() {
+        return auditingManName;
+    }
+
+    public void setAuditingManName(String auditingManName) {
+        this.auditingManName = auditingManName == null ? null : auditingManName.trim();
+    }
+
+    public Date getAuditingTime() {
+        return auditingTime;
+    }
+
+    public void setAuditingTime(Date auditingTime) {
+        this.auditingTime = auditingTime;
+    }
+
+    public String getAuditingFlag() {
+        return auditingFlag;
+    }
+
+    public void setAuditingFlag(String auditingFlag) {
+        this.auditingFlag = auditingFlag == null ? null : auditingFlag.trim();
+    }
+
+    public String getValidFlag() {
+        return validFlag;
+    }
+
+    public void setValidFlag(String validFlag) {
+        this.validFlag = validFlag == null ? null : validFlag.trim();
+    }
+
+    public String getCreateManNo() {
+        return createManNo;
+    }
+
+    public void setCreateManNo(String createManNo) {
+        this.createManNo = createManNo == null ? null : createManNo.trim();
+    }
+
+    public String getCreateManName() {
+        return createManName;
+    }
+
+    public void setCreateManName(String createManName) {
+        this.createManName = createManName == null ? null : createManName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateManNo() {
+        return updateManNo;
+    }
+
+    public void setUpdateManNo(String updateManNo) {
+        this.updateManNo = updateManNo == null ? null : updateManNo.trim();
+    }
+
+    public String getUpdateManName() {
+        return updateManName;
+    }
+
+    public void setUpdateManName(String updateManName) {
+        this.updateManName = updateManName == null ? null : updateManName.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getPikaDataId() {
+        return pikaDataId;
+    }
+
+    public void setPikaDataId(String pikaDataId) {
+        this.pikaDataId = pikaDataId;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", auditdataNo=").append(auditdataNo);
+        sb.append(", materialName=").append(materialName);
+        sb.append(", materialCode=").append(materialCode);
+        sb.append(", stationName=").append(stationName);
+        sb.append(", stationCode=").append(stationCode);
+        sb.append(", recieverName=").append(recieverName);
+        sb.append(", recieverCode=").append(recieverCode);
+        sb.append(", senderName=").append(senderName);
+        sb.append(", senderCode=").append(senderCode);
+        sb.append(", weight=").append(weight);
+        sb.append(", recieverType=").append(recieverType);
+        sb.append(", senderType=").append(senderType);
+        sb.append(", uploaded=").append(uploaded);
+        sb.append(", startTime=").append(startTime);
+        sb.append(", endTime=").append(endTime);
+        sb.append(", memo=").append(memo);
+        sb.append(", auditingManNo=").append(auditingManNo);
+        sb.append(", originalValue=").append(originalValue);
+        sb.append(", syslog=").append(syslog);
+        sb.append(", auditingManName=").append(auditingManName);
+        sb.append(", auditingTime=").append(auditingTime);
+        sb.append(", auditingFlag=").append(auditingFlag);
+        sb.append(", validFlag=").append(validFlag);
+        sb.append(", createManNo=").append(createManNo);
+        sb.append(", createManName=").append(createManName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateManNo=").append(updateManNo);
+        sb.append(", updateManName=").append(updateManName);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append(", pikaDataId=").append(pikaDataId);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 41 - 0
src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/service/IDynamicWorkAuditdataService.java

@@ -0,0 +1,41 @@
+package com.jisco.dynamicweight.dynamicworkauditdata.service;
+
+import com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.AuditDataVO;
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.framework.service.pagehelper.PageList;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * DynamicWorkAuditdata服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-02-08 02:48
+ * 类描述
+ * 修订历史:
+ * 日期:2022-02-08
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicWorkAuditdata服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IDynamicWorkAuditdataService extends IBaseService<DynamicWorkAuditdata, String>{
+
+    void audit(String date, List<AuditDataVO> list);
+
+    /**
+     * 查询上传数据
+     * @param auditingTime1
+     * @param auditingTime2
+     * @return
+     */
+    List<DynamicWorkAuditdata> getUploadData(Date auditingTime1, Date auditingTime2);
+
+    void cancelAudit(List<DynamicWorkAuditdata> list);
+
+    void cancelUpload(List<DynamicWorkAuditdata> list);
+
+    void upload(List<DynamicWorkAuditdata> list);
+}

+ 151 - 0
src/main/java/com/jisco/dynamicweight/dynamicworkauditdata/service/impl/DynamicWorkAuditdataServiceImpl.java

@@ -0,0 +1,151 @@
+package com.jisco.dynamicweight.dynamicworkauditdata.service.impl;
+
+import cn.hutool.core.lang.Assert;
+import com.jisco.dynamicweight.dynamicworkauditdata.mapper.DynamicWorkAuditdataMapper;
+import com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata;
+import com.jisco.dynamicweight.dynamicworkauditdata.service.IDynamicWorkAuditdataService;
+import com.jisco.dynamicweight.dynamicworkupdata.mapper.DynamicWorkUpdataMapper;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.AuditDataVO;
+import com.jisco.dynamicweight.pika.service.ICenternetService;
+import com.jisco.dynamicweight.util.UserUtil;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * DynamicWorkAuditdata服务实现:
+ *
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-02-08 02:48
+ * 类描述
+ * 修订历史:
+ * 日期:2022-02-08
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicWorkAuditdata服务实现
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ * @see null
+ */
+@Service(value = "dynamicWorkAuditdataService")
+public class DynamicWorkAuditdataServiceImpl extends BaseServiceImpl<DynamicWorkAuditdata, String> implements IDynamicWorkAuditdataService {
+
+    @Autowired
+    private DynamicWorkAuditdataMapper dynamicWorkAuditdataMapper;
+
+    @Autowired
+    private DynamicWorkUpdataMapper dynamicWorkUpdataMapper;
+
+    @Autowired
+    private ICenternetService centernetService;
+
+    @Override
+    protected IBaseMapper<DynamicWorkAuditdata, String> getMapper() {
+        return dynamicWorkAuditdataMapper;
+    }
+
+    @Transactional
+    @Override
+    public void audit(String date, List<AuditDataVO> list) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date startTime = null;
+        Date endTime = null;
+        try {
+            startTime = sdf.parse(date + " 00:00:00");
+            endTime = sdf.parse(date + " 23:59:59");
+        } catch (ParseException e) {
+            e.printStackTrace();
+            throw new RuntimeException("日期格式化错误");
+        }
+        for (AuditDataVO auditDataVO : list) {
+            Assert.isTrue(StringUtils.isNotBlank(auditDataVO.getMaterialCode()), "物料编码不能为空:" + auditDataVO);
+            Assert.isTrue(StringUtils.isNotBlank(auditDataVO.getMaterialName()), "物料名称不能为空:" + auditDataVO);
+            Assert.isTrue(StringUtils.isNotBlank(auditDataVO.getStationCode()), "站点编码不能为空:" + auditDataVO);
+            Assert.isTrue(StringUtils.isNotBlank(auditDataVO.getStationName()), "站点名称不能为空:" + auditDataVO);
+            Assert.isTrue(StringUtils.isNotBlank(auditDataVO.getRecieverCode()), "收货库房编码不能为空:" + auditDataVO);
+            Assert.isTrue(StringUtils.isNotBlank(auditDataVO.getRecieverName()), "收货库房名称不能为空:" + auditDataVO);
+            Assert.isTrue(StringUtils.isNotBlank(auditDataVO.getRecieverType()), "收货点类型不能为空:" + auditDataVO);
+            Assert.isTrue(StringUtils.isNotBlank(auditDataVO.getSenderCode()), "发货库房编码不能为空:" + auditDataVO);
+            Assert.isTrue(StringUtils.isNotBlank(auditDataVO.getSenderName()), "发货库房名称不能为空:" + auditDataVO);
+            Assert.isTrue(StringUtils.isNotBlank(auditDataVO.getSenderType()), "发货点类型不能为空:" + auditDataVO);
+            Assert.isTrue(Objects.nonNull(auditDataVO.getRzl()), "重量不能为空:" + auditDataVO);
+            DynamicWorkAuditdata auditdata = new DynamicWorkAuditdata();
+            auditdata.setStationCode(auditDataVO.getStationCode());
+            auditdata.setStationName(auditDataVO.getStationName());
+            auditdata.setMaterialCode(auditDataVO.getMaterialCode());
+            auditdata.setMaterialName(auditDataVO.getMaterialName());
+            auditdata.setRecieverCode(auditDataVO.getRecieverCode());
+            auditdata.setRecieverName(auditDataVO.getRecieverName());
+            auditdata.setRecieverType(auditDataVO.getRecieverType());
+            auditdata.setSenderCode(auditDataVO.getSenderCode());
+            auditdata.setSenderName(auditDataVO.getSenderName());
+            auditdata.setSenderType(auditDataVO.getSenderType());
+            auditdata.setWeight(auditDataVO.getRzl());
+            auditdata.setAuditingManNo(UserUtil.getCurrentUserId());
+            auditdata.setAuditingManName(UserUtil.getCurrentUserName());
+            auditdata.setAuditingTime(new Date());
+            auditdata.setStartTime(startTime);
+            auditdata.setEndTime(endTime);
+            auditdata.setUploaded("0");
+            auditdata.setValidFlag("1");
+            auditdata.setCreateManNo(UserUtil.getCurrentUserId());
+            auditdata.setCreateManName(UserUtil.getCurrentUserName());
+            auditdata.setCreateTime(new Date());
+            dynamicWorkAuditdataMapper.save(auditdata);
+            dynamicWorkUpdataMapper.setUploaded(auditdata);
+        }
+    }
+
+    /**
+     * 查询上传数据
+     *
+     * @param auditingTime1
+     * @param auditingTime2
+     * @return
+     */
+    @Override
+    public List<DynamicWorkAuditdata> getUploadData(Date auditingTime1, Date auditingTime2) {
+        List<DynamicWorkAuditdata> list = dynamicWorkAuditdataMapper.getUploadData(auditingTime1, auditingTime2);
+        return list;
+    }
+
+    @Transactional
+    @Override
+    public void cancelAudit(List<DynamicWorkAuditdata> list) {
+        for (DynamicWorkAuditdata dynamicWorkAuditdata : list) {
+            dynamicWorkAuditdataMapper.deleteByPrimaryKey(dynamicWorkAuditdata.getId());
+        }
+    }
+
+    @Override
+    public void cancelUpload(List<DynamicWorkAuditdata> list) {
+        for (DynamicWorkAuditdata auditdata : list) {
+            Assert.isTrue(auditdata.getUploaded().equals("1"), "数据未上传,不能撤销上传:" + auditdata);
+            auditdata.setUploaded("0");
+        }
+        centernetService.cancelUpload(list);
+        this.batchUpdate(list);
+    }
+
+    @Transactional
+    @Override
+    public void upload(List<DynamicWorkAuditdata> list) {
+        Assert.isTrue(!CollectionUtils.isEmpty(list), "请选择需要上传的数据!");
+        for (DynamicWorkAuditdata auditdata : list) {
+            Assert.isTrue(auditdata.getUploaded().equals("0"), "数据已上传,不能重复上传:" + auditdata);
+            auditdata.setUploaded("1");
+            auditdata.setPikaDataId("DTC" + auditdata.getId());
+        }
+        centernetService.upload(list);
+        this.batchUpdate(list);
+    }
+}

+ 133 - 0
src/main/java/com/jisco/dynamicweight/dynamicworktly/controller/DynamicWorkTlyController.java

@@ -0,0 +1,133 @@
+package com.jisco.dynamicweight.dynamicworktly.controller;
+
+import cn.hutool.core.lang.Assert;
+import com.jisco.dynamicweight.dynamicworktly.model.DynamicWorkTly;
+import com.jisco.dynamicweight.dynamicworktly.service.IDynamicWorkTlyService;
+import com.jisco.dynamicweight.dynamicworkupdata.model.DynamicWorkUpdata;
+import com.jisco.dynamicweight.util.ExcelUtil;
+import com.jisco.dynamicweight.util.UserUtil;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * DynamicWorkTly RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-01-25 05:01
+ * 类描述
+ * 修订历史:
+ * 日期:2022-01-25
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicWorkTly RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/dynamicworktlys")
+public class DynamicWorkTlyController extends BaseRESTfulController {
+
+    @Autowired
+    IDynamicWorkTlyService dynamicWorkTlyService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dynamicworktly:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DynamicWorkTly> list = dynamicWorkTlyService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dynamicworktly:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DynamicWorkTly> list = dynamicWorkTlyService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据DynamicWorkTly对象创建")
+    @ApiImplicitParam(name = "dynamicWorkTly", value = "详细实体dynamicWorkTly", required = true, dataType = "DynamicWorkTly")
+    //@RequiresPermissions("dynamicworktly:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@RequestBody DynamicWorkTly model){
+        Assert.isTrue(model.getRq() != null, "日期不能为空");
+        Assert.isTrue(model.getWeight() != null && model.getWeight().compareTo(new BigDecimal(0)) > 0, "脱硫液重量必须大于0");
+        model.setValidFlag("1");
+        model.setCreateManNo(UserUtil.getCurrentUserId());
+        model.setCreateManName(UserUtil.getCurrentUserName());
+        model.setCreateTime(new Date());
+        DynamicWorkTly dynamicWorkTly = dynamicWorkTlyService.add(model);
+        return success(dynamicWorkTly);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("dynamicworktly:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        DynamicWorkTly dynamicWorkTly = dynamicWorkTlyService.getById(id);
+        return success(dynamicWorkTly);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的dynamicWorkTly信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "dynamicWorkTly", value = "详细实体dynamicWorkTly", required = true, dataType = "DynamicWorkTly")
+    })
+    //@RequiresPermissions("dynamicworktly:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody DynamicWorkTly model){
+        Assert.isTrue(model.getRq() != null, "日期不能为空");
+        Assert.isTrue(model.getWeight() != null && model.getWeight().compareTo(new BigDecimal(0)) > 0, "脱硫液重量必须大于0");
+        model.setUpdateManNo(UserUtil.getCurrentUserId());
+        model.setUpdateManName(UserUtil.getCurrentUserName());
+        model.setUpdateTime(new Date());
+        model.setId(id);
+        DynamicWorkTly dynamicWorkTly = dynamicWorkTlyService.modify(model);
+        return success(dynamicWorkTly);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("dynamicworktly:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  dynamicWorkTlyService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value = "导出Excel", notes = "导出Excel")
+    @PostMapping(value = "/exportExcel")//String
+    public void exportExcel(HttpServletResponse response, @RequestParam HashMap parmas) throws IOException {
+        List<DynamicWorkUpdata> list = dynamicWorkTlyService.query(parmas);
+        ExcelUtil.exportExcel(response, list, DynamicWorkUpdata.class, "脱硫液");
+    }
+
+}

+ 9 - 0
src/main/java/com/jisco/dynamicweight/dynamicworktly/mapper/DynamicWorkTlyMapper.java

@@ -0,0 +1,9 @@
+package com.jisco.dynamicweight.dynamicworktly.mapper;
+
+import com.jisco.dynamicweight.dynamicworktly.model.DynamicWorkTly;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface DynamicWorkTlyMapper extends IBaseMapper<DynamicWorkTly, String> {
+}

+ 372 - 0
src/main/java/com/jisco/dynamicweight/dynamicworktly/mapper/DynamicWorkTlyMapper.xml

@@ -0,0 +1,372 @@
+<?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.jisco.dynamicweight.dynamicworktly.mapper.DynamicWorkTlyMapper">
+  <resultMap id="BaseResultMap" type="com.jisco.dynamicweight.dynamicworktly.model.DynamicWorkTly">
+    <id column="TLY_NO" jdbcType="VARCHAR" property="tlyNo" />
+    <result column="RQ" jdbcType="TIMESTAMP" property="rq" />
+    <result column="WEIGHT" jdbcType="DECIMAL" property="weight" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag" />
+    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
+    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
+    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="columns">
+    TLY_NO, RQ, WEIGHT, MEMO, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
+    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME
+  </sql>
+  <sql id="columns_alias">
+    t.TLY_NO, t.RQ, t.WEIGHT, t.MEMO, t.VALID_FLAG, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, 
+    t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM DYNAMIC_WORK_TLY
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM DYNAMIC_WORK_TLY t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="tlyNo != null and tlyNo != ''">
+        and TLY_NO = #{tlyNo}
+      </if>
+      <if test="rq1 != null">
+        and TO_CHAR(RQ,'yyyy-MM-dd HH24:mi:ss') &gt;= #{rq1}
+      </if>
+      <if test="rq2 != null">
+        and TO_CHAR(RQ,'yyyy-MM-dd HH24:mi:ss') &lt;= #{rq2}
+      </if>
+      <if test="weight != null">
+        and WEIGHT = #{weight}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO = #{memo}
+      </if>
+      <if test="validFlag != null and validFlag != ''">
+        and VALID_FLAG = #{validFlag}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="tlyNo != null and tlyNo != ''">
+        and TLY_NO LIKE '%${tlyNo}%'
+      </if>
+      <if test="rq1 != null">
+        and TO_CHAR(RQ,'yyyy-MM-dd HH24:mi:ss') &gt;= #{rq1}
+      </if>
+      <if test="rq2 != null">
+        and TO_CHAR(RQ,'yyyy-MM-dd HH24:mi:ss') &lt;= #{rq2}
+      </if>
+      <if test="weight != null">
+        and WEIGHT = #{weight}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </if>
+      <if test="validFlag != null and validFlag != ''">
+        and VALID_FLAG LIKE '%${validFlag}%'
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO LIKE '%${createManNo}%'
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME LIKE '%${createManName}%'
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO LIKE '%${updateManNo}%'
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME LIKE '%${updateManName}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from DYNAMIC_WORK_TLY
+    where TLY_NO = #{tlyNo,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from DYNAMIC_WORK_TLY
+    where 1!=1
+      <if test="rq != null">
+        or TO_CHAR(RQ,'yyyy-MM-dd') = '#{rq}'
+      </if>
+      <if test="weight != null">
+        or WEIGHT = #{weight}
+      </if>
+      <if test="memo != null and memo != ''">
+        or MEMO = #{memo}
+      </if>
+      <if test="validFlag != null and validFlag != ''">
+        or VALID_FLAG = #{validFlag}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        or CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        or CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        or UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        or UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.jisco.dynamicweight.dynamicworktly.model.DynamicWorkTly">
+    insert into DYNAMIC_WORK_TLY (TLY_NO, RQ, WEIGHT, 
+      MEMO, VALID_FLAG, CREATE_MAN_NO, 
+      CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, 
+      UPDATE_MAN_NAME, UPDATE_TIME)
+    values (#{tlyNo,jdbcType=VARCHAR}, #{rq,jdbcType=TIMESTAMP}, #{weight,jdbcType=DECIMAL}, 
+      #{memo,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, 
+      #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, 
+      #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.jisco.dynamicweight.dynamicworktly.model.DynamicWorkTly">
+    insert into DYNAMIC_WORK_TLY
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="tlyNo != null">
+        TLY_NO,
+      </if>
+      <if test="rq != null">
+        RQ,
+      </if>
+      <if test="weight != null">
+        WEIGHT,
+      </if>
+      <if test="memo != null">
+        MEMO,
+      </if>
+      <if test="validFlag != null">
+        VALID_FLAG,
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO,
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO,
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="tlyNo != null">
+        #{tlyNo,jdbcType=VARCHAR},
+      </if>
+      <if test="rq != null">
+        #{rq,jdbcType=TIMESTAMP},
+      </if>
+      <if test="weight != null">
+        #{weight,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="validFlag != null">
+        #{validFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateManNo != null">
+        #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.jisco.dynamicweight.dynamicworktly.model.DynamicWorkTly">
+    update DYNAMIC_WORK_TLY
+    set RQ = #{rq,jdbcType=TIMESTAMP},
+      WEIGHT = #{weight,jdbcType=DECIMAL},
+      MEMO = #{memo,jdbcType=VARCHAR},
+      VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
+      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
+    where TLY_NO = #{tlyNo,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.jisco.dynamicweight.dynamicworktly.model.DynamicWorkTly">
+    update DYNAMIC_WORK_TLY
+    <set>
+      <if test="rq != null">
+        RQ = #{rq,jdbcType=TIMESTAMP},
+      </if>
+      <if test="weight != null">
+        WEIGHT = #{weight,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        MEMO = #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="validFlag != null">
+        VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where TLY_NO = #{tlyNo,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where TLY_NO = #{tlyNo,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into DYNAMIC_WORK_TLY 
+      (TLY_NO, 
+      RQ, WEIGHT, MEMO, 
+      VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, 
+      CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
+      UPDATE_TIME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.tlyNo,jdbcType=VARCHAR}, 
+      #{item.rq,jdbcType=TIMESTAMP}, #{item.weight,jdbcType=DECIMAL}, #{item.memo,jdbcType=VARCHAR}, 
+      #{item.validFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, 
+      #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update DYNAMIC_WORK_TLY
+     set
+       TLY_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case TLY_NO" close="end">
+          when #{item.tlyNo,jdbcType=VARCHAR} then #{item.tlyNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RQ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case TLY_NO" close="end">
+          when #{item.tlyNo,jdbcType=VARCHAR} then #{item.rq,jdbcType=TIMESTAMP}
+       </foreach>
+       ,WEIGHT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case TLY_NO" close="end">
+          when #{item.tlyNo,jdbcType=VARCHAR} then #{item.weight,jdbcType=DECIMAL}
+       </foreach>
+       ,MEMO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case TLY_NO" close="end">
+          when #{item.tlyNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
+       </foreach>
+       ,VALID_FLAG=
+       <foreach collection="list" item="item" index="index" separator=" " open="case TLY_NO" close="end">
+          when #{item.tlyNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case TLY_NO" close="end">
+          when #{item.tlyNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case TLY_NO" close="end">
+          when #{item.tlyNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case TLY_NO" close="end">
+          when #{item.tlyNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case TLY_NO" close="end">
+          when #{item.tlyNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case TLY_NO" close="end">
+          when #{item.tlyNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case TLY_NO" close="end">
+          when #{item.tlyNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+     where TLY_NO in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.tlyNo,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from DYNAMIC_WORK_TLY
+    where TLY_NO in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 199 - 0
src/main/java/com/jisco/dynamicweight/dynamicworktly/model/DynamicWorkTly.java

@@ -0,0 +1,199 @@
+package com.jisco.dynamicweight.dynamicworktly.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="脱硫液表")
+public class DynamicWorkTly implements IBasePO<String> {
+    /**
+     * ID(TLY_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="ID",required=true)
+    private String tlyNo;
+
+    /**
+     * 日期(RQ,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="日期",required=true)
+    private Date rq;
+
+    /**
+     * 重量(WEIGHT,DECIMAL,16)
+     */
+    @ApiModelProperty(value="重量",required=true)
+    private BigDecimal weight;
+
+    /**
+     * 备注(MEMO,VARCHAR,200)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String memo;
+
+    /**
+     * 状态(0:无效;1:有效)(VALID_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="状态(0:无效;1:有效)",required=true)
+    private String validFlag;
+
+    /**
+     * 创建人编号(CREATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="创建人编号",required=true)
+    private String createManNo;
+
+    /**
+     * 创建人姓名(CREATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="创建人姓名",required=true)
+    private String createManName;
+
+    /**
+     * 创建时间(YYYY-MM-DD HH:mm:SS)(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建时间(YYYY-MM-DD HH:mm:SS)",required=true)
+    private Date createTime;
+
+    /**
+     * 修改人编号(UPDATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="修改人编号",required=false)
+    private String updateManNo;
+
+    /**
+     * 修改人姓名(UPDATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改人姓名",required=false)
+    private String updateManName;
+
+    /**
+     * 修改时间(YYYY-MM-DD HH:mm:SS)(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间(YYYY-MM-DD HH:mm:SS)",required=false)
+    private Date updateTime;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.tlyNo;
+    }
+
+    @Override
+    public void setId(String tlyNo) {
+        this.tlyNo = tlyNo == null ? null : tlyNo.trim();
+    }
+
+    public String getTlyNo() {
+        return tlyNo;
+    }
+
+    public void setTlyNo(String tlyNo) {
+        this.tlyNo = tlyNo == null ? null : tlyNo.trim();
+    }
+
+    public Date getRq() {
+        return rq;
+    }
+
+    public void setRq(Date rq) {
+        this.rq = rq;
+    }
+
+    public BigDecimal getWeight() {
+        return weight;
+    }
+
+    public void setWeight(BigDecimal weight) {
+        this.weight = weight;
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.trim();
+    }
+
+    public String getValidFlag() {
+        return validFlag;
+    }
+
+    public void setValidFlag(String validFlag) {
+        this.validFlag = validFlag == null ? null : validFlag.trim();
+    }
+
+    public String getCreateManNo() {
+        return createManNo;
+    }
+
+    public void setCreateManNo(String createManNo) {
+        this.createManNo = createManNo == null ? null : createManNo.trim();
+    }
+
+    public String getCreateManName() {
+        return createManName;
+    }
+
+    public void setCreateManName(String createManName) {
+        this.createManName = createManName == null ? null : createManName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateManNo() {
+        return updateManNo;
+    }
+
+    public void setUpdateManNo(String updateManNo) {
+        this.updateManNo = updateManNo == null ? null : updateManNo.trim();
+    }
+
+    public String getUpdateManName() {
+        return updateManName;
+    }
+
+    public void setUpdateManName(String updateManName) {
+        this.updateManName = updateManName == null ? null : updateManName.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", tlyNo=").append(tlyNo);
+        sb.append(", rq=").append(rq);
+        sb.append(", weight=").append(weight);
+        sb.append(", memo=").append(memo);
+        sb.append(", validFlag=").append(validFlag);
+        sb.append(", createManNo=").append(createManNo);
+        sb.append(", createManName=").append(createManName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateManNo=").append(updateManNo);
+        sb.append(", updateManName=").append(updateManName);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 21 - 0
src/main/java/com/jisco/dynamicweight/dynamicworktly/service/IDynamicWorkTlyService.java

@@ -0,0 +1,21 @@
+package com.jisco.dynamicweight.dynamicworktly.service;
+
+import com.jisco.dynamicweight.dynamicworktly.model.DynamicWorkTly;
+import com.steerinfo.framework.service.IBaseService;
+
+/**
+ * DynamicWorkTly服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-01-25 05:01
+ * 类描述
+ * 修订历史:
+ * 日期:2022-01-25
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicWorkTly服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IDynamicWorkTlyService extends IBaseService<DynamicWorkTly, String>{
+
+}

+ 34 - 0
src/main/java/com/jisco/dynamicweight/dynamicworktly/service/impl/DynamicWorkTlyServiceImpl.java

@@ -0,0 +1,34 @@
+package com.jisco.dynamicweight.dynamicworktly.service.impl;
+
+import com.jisco.dynamicweight.dynamicworktly.mapper.DynamicWorkTlyMapper;
+import com.jisco.dynamicweight.dynamicworktly.model.DynamicWorkTly;
+import com.jisco.dynamicweight.dynamicworktly.service.IDynamicWorkTlyService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * DynamicWorkTly服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-01-25 05:01
+ * 类描述
+ * 修订历史:
+ * 日期:2022-01-25
+ * 作者:generator
+ * 参考:
+ * 描述:DynamicWorkTly服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "dynamicWorkTlyService")
+public class DynamicWorkTlyServiceImpl extends BaseServiceImpl<DynamicWorkTly, String> implements IDynamicWorkTlyService {
+
+    @Autowired
+    private DynamicWorkTlyMapper dynamicWorkTlyMapper;
+
+    @Override
+    protected IBaseMapper<DynamicWorkTly, String> getMapper() {
+        return dynamicWorkTlyMapper;
+    }
+}

+ 89 - 25
src/main/java/com/jisco/dynamicweight/dynamicworkupdata/controller/DynamicWorkUpdataController.java

@@ -1,10 +1,12 @@
 package com.jisco.dynamicweight.dynamicworkupdata.controller;
 
 import cn.hutool.core.lang.Assert;
-import com.jisco.dynamicweight.dynamicbasestationmaterial.model.DynamicBaseStationMaterial;
-import com.jisco.dynamicweight.dynamicworkupdata.InbatchDto;
+import com.jisco.dynamicweight.dynamicworkupdata.dto.InbatchDto;
+import com.jisco.dynamicweight.dynamicworkupdata.dto.ReturnedDustDto;
 import com.jisco.dynamicweight.dynamicworkupdata.model.DynamicWorkUpdata;
 import com.jisco.dynamicweight.dynamicworkupdata.service.IDynamicWorkUpdataService;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.AuditDataVO;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.DailyReportVO;
 import com.jisco.dynamicweight.util.ExcelUtil;
 import com.jisco.dynamicweight.util.UserUtil;
 import com.steerinfo.framework.controller.BaseRESTfulController;
@@ -15,14 +17,15 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.format.DateTimeFormatter;
 import java.util.*;
 
 /**
@@ -158,36 +161,97 @@ public class DynamicWorkUpdataController extends BaseRESTfulController {
         ExcelUtil.exportExcel(response, list, DynamicWorkUpdata.class, "动态秤称重数据");
     }
 
-    @ApiOperation(value = "重新计算", notes = "重新计算煤塔秤数据")
+    @ApiOperation(value = "重新获取动态秤称重数据", notes = "重新获取动态秤称重数据")
     @GetMapping(value = "/recalc")//String
     public RESTfulResult recalc(){
         dynamicWorkUpdataService.recalc();
         return success();
     }
 
+    @ApiOperation(value = "数据分批总重量", notes = "数据分批总重量")
+    @GetMapping(value = "/inbatchsTotalWeight/{stationCode}/{date}")
+    public RESTfulResult inbatchsTotalWeight(@PathVariable String stationCode, @PathVariable Date date){
+        Assert.isTrue(StringUtils.isNotBlank(stationCode), "站点编码(皮卡系统)不能为空!");
+        Assert.isTrue(Objects.nonNull(date), "分批日期不能为空!");
+        BigDecimal weight = dynamicWorkUpdataService.inbatchsTotalWeight(stationCode, date);
+        return success(weight);
+    }
+
     @ApiOperation(value = "数据分批", notes = "数据分批")
     @PostMapping(value = "/inbatchs/{id}")
-    @Transactional
     public RESTfulResult inbatchs(@PathVariable String id, @RequestBody List<InbatchDto> list){
-        DynamicWorkUpdata updata = dynamicWorkUpdataService.getById(id);
-        Assert.isTrue(updata.getIsInbatches().compareTo(new BigDecimal(1))==0, updata.getStationName() + "不能进行分批!");
-        Assert.isTrue(updata.getWeight().compareTo(new BigDecimal(0))==0, updata.getStationName() + "重量为0,不能进行分批!");
-        BigDecimal total = new BigDecimal(0);
-        for (InbatchDto inbatchDto : list) {
-            DynamicWorkUpdata data = new DynamicWorkUpdata();
-            BeanUtils.copyProperties(updata, data);
-            data.setId(null);
-            data.setUpdataNo(null);
-            data.setMaterialCode(inbatchDto.getMaterialCode());
-            data.setMaterialName(inbatchDto.getMaterialName());
-            data.setWeight(inbatchDto.getWeight());
-            data.setCreateManNo(UserUtil.getCurrentUserId());
-            data.setCreateManName(UserUtil.getCurrentUserName());
-            data.setCreateTime(new Date());
-            dynamicWorkUpdataService.add(data);
-            total = total.add(data.getWeight());
-        }
-        Assert.isTrue(updata.getWeight().compareTo(total) == 0, "分批重量之和与总重量不相等!");
+        dynamicWorkUpdataService.inbatchs(id, list);
+        return success();
+    }
+
+    @ApiOperation(value = "返粉总重量", notes = "返粉总重量")
+    @GetMapping(value = "/returnedDustTotalWeight/{id}")
+    public RESTfulResult returnedDustWeight(@PathVariable String id){
+        Assert.isTrue(StringUtils.isNotBlank(id), "id不能为空!");
+        BigDecimal weight = dynamicWorkUpdataService.returnedDustWeight(id);
+        return success(weight);
+    }
+
+    @ApiOperation(value = "返粉", notes = "返粉")
+    @PostMapping(value = "/returnedDust/{id}")
+    public RESTfulResult returnedDust(@PathVariable String id, @RequestBody List<ReturnedDustDto> list){
+        dynamicWorkUpdataService.returnedDust(id, list);
+        return success();
+    }
+
+    @ApiOperation(value = "重新计算焦炭量", notes = "重新计算焦炭量")
+    @PostMapping(value = "/recalcCoke/{k:.+}")
+    public RESTfulResult recalcCoke(@PathVariable BigDecimal k, @RequestBody List<DynamicWorkUpdata> list){
+        dynamicWorkUpdataService.recalcCoke(k, list);
         return success();
     }
+
+
+    @ApiOperation(value="动态秤日报表", notes="动态秤日报表")
+    @ApiImplicitParam(paramType = "path", name = "date", value = "date", required = true, dataType = "Date")
+    @GetMapping(value = "dailyReport/{date}")
+    public RESTfulResult dailyReport(@PathVariable String date){
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            sdf.parse(date);
+        } catch (ParseException e) {
+            e.printStackTrace();
+            throw new RuntimeException("日期格式不正确(yyyy-MM-dd)");
+        }
+        List<DailyReportVO> list = dynamicWorkUpdataService.dailyReport(date);
+        return success(list);
+    }
+
+    @ApiOperation(value = "动态秤日报表导出Excel", notes = "动态秤日报表导出Excel")
+    @PostMapping(value = "/dailyReport/exportExcel/{date}")
+    public void dailyReportExportExcel(HttpServletResponse response, @PathVariable String date) throws IOException {
+        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        df.parse(date);
+        List<DailyReportVO> list = dynamicWorkUpdataService.dailyReport(date);
+        ExcelUtil.exportExcel(response, list, DailyReportVO.class, "动态秤称重数据");
+    }
+
+    @ApiOperation(value="查询待审核数据", notes="查询待审核数据")
+    @ApiImplicitParam(paramType = "path", name = "date", value = "date", required = true, dataType = "Date")
+    @GetMapping(value = "getAuditData/{date}")
+    public RESTfulResult getAuditData(@PathVariable String date){
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            sdf.parse(date);
+        } catch (ParseException e) {
+            e.printStackTrace();
+            throw new RuntimeException("日期格式不正确(yyyy-MM-dd)");
+        }
+        List<AuditDataVO> list = dynamicWorkUpdataService.getAuditData(date);
+        return success(list);
+    }
+
+    @ApiOperation(value = "待审核数据导出Excel", notes = "待审核数据导出Excel")
+    @PostMapping(value = "/exportAuditDataExcel/{date}")
+    public void exportAuditDataExcel(HttpServletResponse response, @PathVariable String date) throws IOException {
+        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        df.parse(date);
+        List<AuditDataVO> list = dynamicWorkUpdataService.getAuditData(date);
+        ExcelUtil.exportExcel(response, list, AuditDataVO.class, "待审核数据");
+    }
 }

+ 43 - 0
src/main/java/com/jisco/dynamicweight/dynamicworkupdata/dto/InbatchDto.java

@@ -0,0 +1,43 @@
+package com.jisco.dynamicweight.dynamicworkupdata.dto;
+
+import java.math.BigDecimal;
+
+public class InbatchDto {
+
+    private String materialCode;
+    private String materialName;
+    private BigDecimal weight;
+
+    public String getMaterialCode() {
+        return materialCode;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode;
+    }
+
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName;
+    }
+
+    public BigDecimal getWeight() {
+        return weight;
+    }
+
+    public void setWeight(BigDecimal weight) {
+        this.weight = weight;
+    }
+
+    @Override
+    public String toString() {
+        return "InbatchDto{" +
+                "materialCode='" + materialCode + '\'' +
+                ", materialName='" + materialName + '\'' +
+                ", weight=" + weight +
+                '}';
+    }
+}

+ 83 - 0
src/main/java/com/jisco/dynamicweight/dynamicworkupdata/dto/ReturnedDustDto.java

@@ -0,0 +1,83 @@
+package com.jisco.dynamicweight.dynamicworkupdata.dto;
+
+import java.math.BigDecimal;
+
+public class ReturnedDustDto {
+
+    private String stationCode;
+    private String stationName;
+    private String materialCode;
+    private String materialName;
+    private BigDecimal weight;
+    private String recieverCode;
+    private String recieverName;
+
+    public String getStationCode() {
+        return stationCode;
+    }
+
+    public void setStationCode(String stationCode) {
+        this.stationCode = stationCode;
+    }
+
+    public String getStationName() {
+        return stationName;
+    }
+
+    public void setStationName(String stationName) {
+        this.stationName = stationName;
+    }
+
+    public String getMaterialCode() {
+        return materialCode;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode;
+    }
+
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName;
+    }
+
+    public BigDecimal getWeight() {
+        return weight;
+    }
+
+    public void setWeight(BigDecimal weight) {
+        this.weight = weight;
+    }
+
+    public String getRecieverCode() {
+        return recieverCode;
+    }
+
+    public void setRecieverCode(String recieverCode) {
+        this.recieverCode = recieverCode;
+    }
+
+    public String getRecieverName() {
+        return recieverName;
+    }
+
+    public void setRecieverName(String recieverName) {
+        this.recieverName = recieverName;
+    }
+
+    @Override
+    public String toString() {
+        return "ReturnedDustDto{" +
+                "stationCode='" + stationCode + '\'' +
+                ", stationName='" + stationName + '\'' +
+                ", materialCode='" + materialCode + '\'' +
+                ", materialName='" + materialName + '\'' +
+                ", weight=" + weight +
+                ", recieverCode='" + recieverCode + '\'' +
+                ", recieverName='" + recieverName + '\'' +
+                '}';
+    }
+}

+ 60 - 1
src/main/java/com/jisco/dynamicweight/dynamicworkupdata/mapper/DynamicWorkUpdataMapper.java

@@ -1,13 +1,72 @@
 package com.jisco.dynamicweight.dynamicworkupdata.mapper;
 
+import com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata;
 import com.jisco.dynamicweight.dynamicworkupdata.model.DynamicWorkUpdata;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.AuditDataVO;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.DailyReportVO;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
 @Mapper
 public interface DynamicWorkUpdataMapper extends IBaseMapper<DynamicWorkUpdata, String> {
     /**
-     *重新计算煤塔秤数据
+     * 重新获取动态秤称重数据
      */
     void recalc();
+
+    /**
+     * 数据分批总重量
+     *
+     * @param stationCode
+     * @param date1
+     * @param date2
+     * @return
+     */
+    BigDecimal inbatchsTotalWeight(String stationCode, Date date1, Date date2);
+
+    /**
+     * 返粉总重量
+     *
+     * @param map String meterialCode, Date date1, Date date2, BigDecimal weight
+     * @return
+     */
+    void returnedDustWeight(Map<String, Object> map);
+
+    /**
+     * 动态秤日报表
+     *
+     * @return
+     */
+    List<DailyReportVO> dailyReport(LocalDateTime bl8start,
+                                    LocalDateTime bl8end,
+                                    LocalDateTime bl16start,
+                                    LocalDateTime bl16end,
+                                    LocalDateTime bl24start,
+                                    LocalDateTime bl24end,
+                                    LocalDateTime rzlstart,
+                                    LocalDateTime rzlend,
+                                    LocalDateTime yzlstart,
+                                    LocalDateTime yzlend,
+                                    LocalDateTime nzlstart,
+                                    LocalDateTime nzlend);
+
+    /**
+     * 查询待审核数据
+     * @param bl8start
+     * @param bl8end
+     * @param bl16start
+     * @param bl16end
+     * @param bl24start
+     * @param bl24end
+     * @return
+     */
+    List<AuditDataVO> getAuditData(LocalDateTime bl8start, LocalDateTime bl8end, LocalDateTime bl16start, LocalDateTime bl16end, LocalDateTime bl24start, LocalDateTime bl24end);
+
+    void setUploaded(DynamicWorkAuditdata auditdata);
 }

+ 328 - 33
src/main/java/com/jisco/dynamicweight/dynamicworkupdata/mapper/DynamicWorkUpdataMapper.xml

@@ -64,10 +64,10 @@
         SELECT
         <include refid="columns_alias"/>,
         DYNAMIC_BASE_BATCH_STATION.IS_UPLOAD, DYNAMIC_BASE_BATCH_STATION.IS_INBATCHES,
-        DYNAMIC_BASE_METERIAL.IS_RETURNED_DUST, DYNAMIC_BASE_METERIAL.IS_COKE
+        DYNAMIC_BASE_MATERIAL.IS_RETURNED_DUST, DYNAMIC_BASE_MATERIAL.IS_COKE
         FROM DYNAMIC_WORK_UPDATA t
         left join DYNAMIC_BASE_BATCH_STATION on t.STATION_CODE = DYNAMIC_BASE_BATCH_STATION.PIKA_CODE
-        left join DYNAMIC_BASE_METERIAL on t.MATERIAL_CODE = DYNAMIC_BASE_METERIAL.METERIAL_CODE
+        left join DYNAMIC_BASE_MATERIAL on t.MATERIAL_CODE = DYNAMIC_BASE_MATERIAL.MATERIAL_CODE
     </sql>
     <sql id="where">
         <where>
@@ -181,97 +181,97 @@
     <sql id="whereLike">
         <where>
             <if test="updataNo != null and updataNo != ''">
-                and UPDATA_NO LIKE '%${updataNo}%'
+                and t.UPDATA_NO LIKE '%${updataNo}%'
             </if>
             <if test="materialName != null and materialName != ''">
-                and MATERIAL_NAME LIKE '%${materialName}%'
+                and t.MATERIAL_NAME LIKE '%${materialName}%'
             </if>
             <if test="materialCode != null and materialCode != ''">
-                and MATERIAL_CODE LIKE '%${materialCode}%'
+                and t.MATERIAL_CODE LIKE '%${materialCode}%'
             </if>
             <if test="stationName != null and stationName != ''">
-                and STATION_NAME LIKE '%${stationName}%'
+                and t.STATION_NAME LIKE '%${stationName}%'
             </if>
             <if test="stationCode != null and stationCode != ''">
-                and STATION_CODE LIKE '%${stationCode}%'
+                and t.STATION_CODE LIKE '%${stationCode}%'
             </if>
             <if test="recieverName != null and recieverName != ''">
-                and RECIEVER_NAME LIKE '%${recieverName}%'
+                and t.RECIEVER_NAME LIKE '%${recieverName}%'
             </if>
             <if test="recieverCode != null and recieverCode != ''">
-                and RECIEVER_CODE LIKE '%${recieverCode}%'
+                and t.RECIEVER_CODE LIKE '%${recieverCode}%'
             </if>
             <if test="senderName != null and senderName != ''">
-                and SENDER_NAME LIKE '%${senderName}%'
+                and t.SENDER_NAME LIKE '%${senderName}%'
             </if>
             <if test="senderCode != null and senderCode != ''">
-                and SENDER_CODE LIKE '%${senderCode}%'
+                and t.SENDER_CODE LIKE '%${senderCode}%'
             </if>
             <if test="weight != null and weight != ''">
-                and WEIGHT LIKE '%${weight}%'
+                and t.WEIGHT LIKE '%${weight}%'
             </if>
             <if test="recieverType != null and recieverType != ''">
-                and RECIEVER_TYPE LIKE '%${recieverType}%'
+                and t.RECIEVER_TYPE LIKE '%${recieverType}%'
             </if>
             <if test="senderType != null and senderType != ''">
-                and SENDER_TYPE LIKE '%${senderType}%'
+                and t.SENDER_TYPE LIKE '%${senderType}%'
             </if>
             <if test="uploaded != null and uploaded != ''">
-                and UPLOADED LIKE '%${uploaded}%'
+                and t.UPLOADED LIKE '%${uploaded}%'
             </if>
             <if test="startTime != null">
-                and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
+                and TO_CHAR(t.START_TIME,'yyyy-MM-dd') = #{startTime}
             </if>
             <if test="endTime != null">
-                and TO_CHAR(END_TIME,'yyyy-MM-dd HH24:mi:ss') = #{endTime}
+                and TO_CHAR(t.END_TIME,'yyyy-MM-dd HH24:mi:ss') = #{endTime}
             </if>
             <if test="endTime1 != null">
-                and TO_CHAR(END_TIME,'yyyy-MM-dd HH24:mi:ss') &gt;= #{endTime1}
+                and TO_CHAR(t.END_TIME,'yyyy-MM-dd HH24:mi:ss') &gt;= #{endTime1}
             </if>
             <if test="endTime2 != null">
-                and TO_CHAR(END_TIME,'yyyy-MM-dd HH24:mi:ss') &lt;= #{endTime2}
+                and TO_CHAR(t.END_TIME,'yyyy-MM-dd HH24:mi:ss') &lt;= #{endTime2}
             </if>
             <if test="memo != null and memo != ''">
-                and MEMO LIKE '%${memo}%'
+                and t.MEMO LIKE '%${memo}%'
             </if>
             <if test="auditingManNo != null and auditingManNo != ''">
-                and AUDITING_MAN_NO LIKE '%${auditingManNo}%'
+                and t.AUDITING_MAN_NO LIKE '%${auditingManNo}%'
             </if>
             <if test="originalValue != null and originalValue != ''">
-                and ORIGINAL_VALUE LIKE '%${originalValue}%'
+                and t.ORIGINAL_VALUE LIKE '%${originalValue}%'
             </if>
             <if test="syslog != null and syslog != ''">
-                and SYSLOG LIKE '%${syslog}%'
+                and t.SYSLOG LIKE '%${syslog}%'
             </if>
             <if test="auditingManName != null and auditingManName != ''">
-                and AUDITING_MAN_NAME LIKE '%${auditingManName}%'
+                and t.AUDITING_MAN_NAME LIKE '%${auditingManName}%'
             </if>
             <if test="auditingTime != null">
-                and TO_CHAR(AUDITING_TIME,'yyyy-MM-dd') = #{auditingTime}
+                and TO_CHAR(t.AUDITING_TIME,'yyyy-MM-dd') = #{auditingTime}
             </if>
             <if test="auditingFlag != null and auditingFlag != ''">
-                and AUDITING_FLAG LIKE '%${auditingFlag}%'
+                and t.AUDITING_FLAG LIKE '%${auditingFlag}%'
             </if>
             <if test="validFlag != null and validFlag != ''">
-                and VALID_FLAG LIKE '%${validFlag}%'
+                and t.VALID_FLAG LIKE '%${validFlag}%'
             </if>
             <if test="createManNo != null and createManNo != ''">
-                and CREATE_MAN_NO LIKE '%${createManNo}%'
+                and t.CREATE_MAN_NO LIKE '%${createManNo}%'
             </if>
             <if test="createManName != null and createManName != ''">
-                and CREATE_MAN_NAME LIKE '%${createManName}%'
+                and t.CREATE_MAN_NAME LIKE '%${createManName}%'
             </if>
             <if test="createTime != null">
-                and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+                and TO_CHAR(t.CREATE_TIME,'yyyy-MM-dd') = #{createTime}
             </if>
             <if test="updateManNo != null and updateManNo != ''">
-                and UPDATE_MAN_NO LIKE '%${updateManNo}%'
+                and t.UPDATE_MAN_NO LIKE '%${updateManNo}%'
             </if>
             <if test="updateManName != null and updateManName != ''">
-                and UPDATE_MAN_NAME LIKE '%${updateManName}%'
+                and t.UPDATE_MAN_NAME LIKE '%${updateManName}%'
             </if>
             <if test="updateTime != null">
-                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+                and TO_CHAR(t.UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
             </if>
             <if test="isUpload != null">
                 and IS_UPLOAD = #{isUpload}
@@ -721,6 +721,285 @@
     <select id="recalc" statementType="CALLABLE">
         {call GENERATEUPDATA()}
     </select>
+    <select id="inbatchsTotalWeight" resultType="java.math.BigDecimal">
+        select sum(weight)
+        from DYNAMIC_WORK_UPDATA
+        where STATION_CODE = #{stationCode}
+          and END_TIME between #{date1} and #{date2}
+    </select>
+    <select id="returnedDustWeight" statementType="CALLABLE" parameterType="map">
+        {call RETURNEDDUSTWEIGHT(#{meterialCode}, #{date1}, #{date2},
+                                 #{weight,mode=OUT,jdbcType=NUMERIC,javaType=java.math.BigDecimal})}
+    </select>
+    <resultMap id="DailyReportMap" type="com.jisco.dynamicweight.dynamicworkupdata.vo.DailyReportVO">
+        <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName"/>
+        <result column="STATION_NAME" jdbcType="VARCHAR" property="stationName"/>
+        <result column="RECIEVER_NAME" jdbcType="VARCHAR" property="recieverName"/>
+        <result column="SENDER_NAME" jdbcType="VARCHAR" property="senderName"/>
+        <result column="BL8" jdbcType="NUMERIC" property="bl8"/>
+        <result column="BL16" jdbcType="NUMERIC" property="bl16"/>
+        <result column="BL24" jdbcType="NUMERIC" property="bl24"/>
+        <result column="rzl" jdbcType="NUMERIC" property="rzl"/>
+        <result column="yzl" jdbcType="NUMERIC" property="yzl"/>
+        <result column="nzl" jdbcType="NUMERIC" property="nzl"/>
+    </resultMap>
+    <select id="dailyReport" resultMap="DailyReportMap">
+        SELECT a.STATION_NAME,
+               a.MATERIAL_NAME,
+               a.RECIEVER_NAME,
+               a.SENDER_NAME,
+               a.BL8,
+               b.BL16,
+               c.BL24,
+               d.rzl,
+               e.yzl,
+               f.nzl
+        FROM (
+                 SELECT STATION_NAME,
+                        MATERIAL_NAME,
+                        RECIEVER_NAME,
+                        SENDER_NAME,
+                        sum(WEIGHT) AS BL8
+                 FROM DYNAMIC_WORK_UPDATA t
+                 WHERE t.END_TIME &gt;= #{bl8start}
+                   AND t.END_TIME &lt;= #{bl8end}
+                 GROUP BY STATION_NAME,
+                          MATERIAL_NAME,
+                          RECIEVER_NAME,
+                          SENDER_NAME
+             ) a
+                 LEFT JOIN (
+            SELECT STATION_NAME,
+                   MATERIAL_NAME,
+                   RECIEVER_NAME,
+                   SENDER_NAME,
+                   sum(WEIGHT) AS BL16
+            FROM DYNAMIC_WORK_UPDATA t
+            WHERE t.END_TIME &gt;= #{bl16start}
+              AND t.END_TIME &lt;= #{bl16end}
+            GROUP BY STATION_NAME,
+                     MATERIAL_NAME,
+                     RECIEVER_NAME,
+                     SENDER_NAME
+        ) b
+                           on a.STATION_NAME = b.STATION_NAME
+                               and a.MATERIAL_NAME = b.MATERIAL_NAME
+                               and a.RECIEVER_NAME = b.RECIEVER_NAME
+                               and a.SENDER_NAME = b.SENDER_NAME
+                 LEFT JOIN (
+            SELECT STATION_NAME,
+                   MATERIAL_NAME,
+                   RECIEVER_NAME,
+                   SENDER_NAME,
+                   sum(WEIGHT) AS BL24
+            FROM DYNAMIC_WORK_UPDATA t
+            WHERE t.END_TIME &gt;= #{bl24start}
+              AND t.END_TIME &lt;= #{bl24end}
+            GROUP BY STATION_NAME,
+                     MATERIAL_NAME,
+                     RECIEVER_NAME,
+                     SENDER_NAME
+        ) c
+                           on a.STATION_NAME = c.STATION_NAME
+                               and a.MATERIAL_NAME = c.MATERIAL_NAME
+                               and a.RECIEVER_NAME = c.RECIEVER_NAME
+                               and a.SENDER_NAME = c.SENDER_NAME
+                 LEFT JOIN (
+            SELECT STATION_NAME,
+                   MATERIAL_NAME,
+                   RECIEVER_NAME,
+                   SENDER_NAME,
+                   sum(WEIGHT) AS rzl
+            FROM DYNAMIC_WORK_UPDATA t
+            WHERE t.END_TIME &gt;= #{rzlstart}
+              AND t.END_TIME &lt;= #{rzlend}
+            GROUP BY STATION_NAME,
+                     MATERIAL_NAME,
+                     RECIEVER_NAME,
+                     SENDER_NAME
+        ) d
+                           on a.STATION_NAME = d.STATION_NAME
+                               and a.MATERIAL_NAME = d.MATERIAL_NAME
+                               and a.RECIEVER_NAME = d.RECIEVER_NAME
+                               and a.SENDER_NAME = d.SENDER_NAME
+                 LEFT JOIN (
+            SELECT STATION_NAME,
+                   MATERIAL_NAME,
+                   RECIEVER_NAME,
+                   SENDER_NAME,
+                   sum(WEIGHT) AS yzl
+            FROM DYNAMIC_WORK_UPDATA t
+            WHERE t.END_TIME &gt;= #{yzlstart}
+              AND t.END_TIME &lt;= #{yzlend}
+            GROUP BY STATION_NAME,
+                     MATERIAL_NAME,
+                     RECIEVER_NAME,
+                     SENDER_NAME
+        ) e
+                           on a.STATION_NAME = e.STATION_NAME
+                               and a.MATERIAL_NAME = e.MATERIAL_NAME
+                               and a.RECIEVER_NAME = e.RECIEVER_NAME
+                               and a.SENDER_NAME = e.SENDER_NAME
+                 LEFT JOIN (
+            SELECT STATION_NAME,
+                   MATERIAL_NAME,
+                   RECIEVER_NAME,
+                   SENDER_NAME,
+                   sum(WEIGHT) AS nzl
+            FROM DYNAMIC_WORK_UPDATA t
+            WHERE t.END_TIME &gt;= #{nzlstart}
+              AND t.END_TIME &lt;= #{nzlend}
+            GROUP BY STATION_NAME,
+                     MATERIAL_NAME,
+                     RECIEVER_NAME,
+                     SENDER_NAME
+        ) f
+                           on f.STATION_NAME = c.STATION_NAME
+                               and f.MATERIAL_NAME = c.MATERIAL_NAME
+                               and f.RECIEVER_NAME = c.RECIEVER_NAME
+                               and f.SENDER_NAME = c.SENDER_NAME
+    </select>
+    <!--    查询审核数据-->
+    <resultMap id="getAuditDataMap" type="com.jisco.dynamicweight.dynamicworkupdata.vo.AuditDataVO">
+        <result column="MATERIAL_CODE" jdbcType="VARCHAR" property="materialCode"/>
+        <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName"/>
+        <result column="STATION_CODE" jdbcType="VARCHAR" property="stationCode"/>
+        <result column="STATION_NAME" jdbcType="VARCHAR" property="stationName"/>
+        <result column="RECIEVER_CODE" jdbcType="VARCHAR" property="recieverCode"/>
+        <result column="RECIEVER_NAME" jdbcType="VARCHAR" property="recieverName"/>
+        <result column="RECIEVER_TYPE" jdbcType="VARCHAR" property="recieverType"/>
+        <result column="SENDER_CODE" jdbcType="VARCHAR" property="senderCode"/>
+        <result column="SENDER_NAME" jdbcType="VARCHAR" property="senderName"/>
+        <result column="SENDER_TYPE" jdbcType="VARCHAR" property="senderType"/>
+        <result column="B8" jdbcType="NUMERIC" property="bl8"/>
+        <result column="B16" jdbcType="NUMERIC" property="bl16"/>
+        <result column="B24" jdbcType="NUMERIC" property="bl24"/>
+    </resultMap>
+    <!--    查询待审核数据-->
+    <select id="getAuditData" resultMap="getAuditDataMap">
+        select a.STATION_CODE,
+               a.STATION_NAME,
+               a.MATERIAL_CODE,
+               a.MATERIAL_NAME,
+               a.RECIEVER_CODE,
+               a.RECIEVER_NAME,
+               a.RECIEVER_TYPE,
+               a.SENDER_CODE,
+               a.SENDER_NAME,
+               a.SENDER_TYPE,
+               b.B8,
+               c.B16,
+               d.B24
+        from (
+                 SELECT STATION_CODE,
+                        STATION_NAME,
+                        MATERIAL_CODE,
+                        MATERIAL_NAME,
+                        RECIEVER_CODE,
+                        RECIEVER_NAME,
+                        RECIEVER_TYPE,
+                        SENDER_CODE,
+                        SENDER_NAME,
+                        SENDER_TYPE
+                 FROM DYNAMIC_WORK_UPDATA
+                 WHERE END_TIME &gt;= #{bl8start}
+                   AND END_TIME &lt;= #{bl24end}
+                   AND VALID_FLAG = '1'
+                   AND STATION_NAME &lt;&gt; 'M1#皮带秤'
+                   AND STATION_NAME &lt;&gt; 'M1B#皮带秤'
+                 GROUP BY STATION_CODE,
+                          STATION_NAME,
+                          MATERIAL_CODE,
+                          MATERIAL_NAME,
+                          RECIEVER_CODE,
+                          RECIEVER_NAME,
+                          RECIEVER_TYPE,
+                          SENDER_CODE,
+                          SENDER_NAME,
+                          SENDER_TYPE
+             ) a
+                 LEFT JOIN
+             (SELECT STATION_NAME,
+                     MATERIAL_NAME,
+                     RECIEVER_NAME,
+                     SENDER_NAME,
+                     sum(WEIGHT) B8
+              FROM DYNAMIC_WORK_UPDATA
+              WHERE END_TIME &gt;= #{bl8start}
+                AND END_TIME &lt;= #{bl8end}
+                AND VALID_FLAG = '1'
+                AND STATION_NAME &lt;&gt; 'M1#皮带秤'
+                AND STATION_NAME &lt;&gt; 'M1B#皮带秤'
+              GROUP BY STATION_CODE,
+                       STATION_NAME,
+                       MATERIAL_CODE,
+                       MATERIAL_NAME,
+                       RECIEVER_CODE,
+                       RECIEVER_NAME,
+                       RECIEVER_TYPE,
+                       SENDER_CODE,
+                       SENDER_NAME,
+                       SENDER_TYPE
+             ) b
+             on a.STATION_NAME = b.STATION_NAME
+                 and a.MATERIAL_NAME = b.MATERIAL_NAME
+                 and a.RECIEVER_NAME = b.RECIEVER_NAME
+                 and a.SENDER_NAME = b.SENDER_NAME
+                 LEFT JOIN
+             (SELECT STATION_NAME,
+                     MATERIAL_NAME,
+                     RECIEVER_NAME,
+                     SENDER_NAME,
+                     sum(WEIGHT) B16
+              FROM DYNAMIC_WORK_UPDATA
+              WHERE END_TIME &gt;= #{bl16start}
+                AND END_TIME &lt;= #{bl16end}
+                AND VALID_FLAG = '1'
+                AND STATION_NAME &lt;&gt; 'M1#皮带秤'
+                AND STATION_NAME &lt;&gt; 'M1B#皮带秤'
+              GROUP BY STATION_CODE,
+                       STATION_NAME,
+                       MATERIAL_CODE,
+                       MATERIAL_NAME,
+                       RECIEVER_CODE,
+                       RECIEVER_NAME,
+                       RECIEVER_TYPE,
+                       SENDER_CODE,
+                       SENDER_NAME,
+                       SENDER_TYPE
+             ) c
+             on a.STATION_NAME = c.STATION_NAME
+                 and a.MATERIAL_NAME = c.MATERIAL_NAME
+                 and a.RECIEVER_NAME = c.RECIEVER_NAME
+                 and a.SENDER_NAME = c.SENDER_NAME
+                 LEFT JOIN
+             (SELECT STATION_NAME,
+                     MATERIAL_NAME,
+                     RECIEVER_NAME,
+                     SENDER_NAME,
+                     sum(WEIGHT) B24
+              FROM DYNAMIC_WORK_UPDATA
+              WHERE END_TIME &gt;= #{bl24start}
+                AND END_TIME &lt;= #{bl24end}
+                AND VALID_FLAG = '1'
+                AND STATION_NAME &lt;&gt; 'M1#皮带秤'
+                AND STATION_NAME &lt;&gt; 'M1B#皮带秤'
+              GROUP BY STATION_CODE,
+                       STATION_NAME,
+                       MATERIAL_CODE,
+                       MATERIAL_NAME,
+                       RECIEVER_CODE,
+                       RECIEVER_NAME,
+                       RECIEVER_TYPE,
+                       SENDER_CODE,
+                       SENDER_NAME,
+                       SENDER_TYPE
+             ) d
+             on a.STATION_NAME = d.STATION_NAME
+                 and a.MATERIAL_NAME = d.MATERIAL_NAME
+                 and a.RECIEVER_NAME = d.RECIEVER_NAME
+                 and a.SENDER_NAME = d.SENDER_NAME
+    </select>
     <insert id="batchInsert" parameterType="java.util.List">
         insert into DYNAMIC_WORK_UPDATA
         (UPDATA_NO,
@@ -879,6 +1158,22 @@
             #{item.updataNo,jdbcType=VARCHAR}
         </foreach>
     </update>
+    <update id="setUploaded">
+        UPDATE DYNAMIC_WORK_UPDATA t
+        SET t.AUDITING_FLAG = '1'
+        WHERE t.STATION_NAME = #{stationName}
+          AND t.STATION_CODE = #{stationCode}
+          AND t.MATERIAL_CODE = #{materialCode}
+          AND t.MATERIAL_NAME = #{materialName}
+          AND t.RECIEVER_NAME = #{recieverName}
+          AND t.RECIEVER_CODE = #{recieverCode}
+          AND t.SENDER_NAME = #{senderName}
+          AND t.SENDER_CODE = #{senderCode}
+          AND t.RECIEVER_TYPE = #{recieverType}
+          AND t.SENDER_TYPE = #{senderType}
+          AND t.END_TIME &gt;= #{startTime}
+          AND t.END_TIME &lt;= #{endTime}
+    </update>
     <delete id="batchDelete" parameterType="java.util.List">
         delete from DYNAMIC_WORK_UPDATA
         where UPDATA_NO in

+ 3 - 3
src/main/java/com/jisco/dynamicweight/dynamicworkupdata/model/DynamicWorkUpdata.java

@@ -205,7 +205,7 @@ public class DynamicWorkUpdata implements IBasePO<String> {
      * 是否焦炭(IS_COKE,DECIMAL,0)
      */
     @ApiModelProperty(value="是否焦炭",required=true)
-    private Short isCoke;
+    private BigDecimal isCoke;
 
     private static final long serialVersionUID = 1L;
 
@@ -475,11 +475,11 @@ public class DynamicWorkUpdata implements IBasePO<String> {
         this.isReturnedDust = isReturnedDust;
     }
 
-    public Short getIsCoke() {
+    public BigDecimal getIsCoke() {
         return isCoke;
     }
 
-    public void setIsCoke(Short isCoke) {
+    public void setIsCoke(BigDecimal isCoke) {
         this.isCoke = isCoke;
     }
 

+ 58 - 1
src/main/java/com/jisco/dynamicweight/dynamicworkupdata/service/IDynamicWorkUpdataService.java

@@ -1,8 +1,16 @@
 package com.jisco.dynamicweight.dynamicworkupdata.service;
 
+import com.jisco.dynamicweight.dynamicworkupdata.dto.InbatchDto;
+import com.jisco.dynamicweight.dynamicworkupdata.dto.ReturnedDustDto;
 import com.jisco.dynamicweight.dynamicworkupdata.model.DynamicWorkUpdata;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.AuditDataVO;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.DailyReportVO;
 import com.steerinfo.framework.service.IBaseService;
 
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
 /**
  * DynamicWorkUpdata服务接口:
  * @author generator
@@ -19,7 +27,56 @@ import com.steerinfo.framework.service.IBaseService;
 public interface IDynamicWorkUpdataService extends IBaseService<DynamicWorkUpdata, String>{
 
     /**
-     * 重新计算煤塔秤数据
+     * 重新获取动态秤称重数据
      */
     void recalc();
+
+    /**
+     * 数据分批总重量
+     * @param stationCode
+     * @return
+     */
+    BigDecimal inbatchsTotalWeight(String stationCode, Date date);
+
+    /**
+     * 返粉总重量
+     * @param id
+     * @return
+     */
+    BigDecimal returnedDustWeight(String id);
+
+    /**
+     * 返粉
+     * @param id
+     * @param list
+     */
+    void returnedDust(String id, List<ReturnedDustDto> list);
+
+    /**
+     * 数据分批
+     * @param id
+     * @param list
+     */
+    void inbatchs(String id, List<InbatchDto> list);
+
+    /**
+     * 重新计算焦炭量
+     * @param k
+     * @param list
+     */
+    void recalcCoke(BigDecimal k, List<DynamicWorkUpdata> list);
+
+    /**
+     * 日报表
+     * @param date
+     * @return
+     */
+    List<DailyReportVO> dailyReport(String date);
+
+    /**
+     * 查询待审核数据
+     * @param date
+     * @return
+     */
+    List<AuditDataVO> getAuditData(String date);
 }

+ 243 - 1
src/main/java/com/jisco/dynamicweight/dynamicworkupdata/service/impl/DynamicWorkUpdataServiceImpl.java

@@ -1,12 +1,29 @@
 package com.jisco.dynamicweight.dynamicworkupdata.service.impl;
 
+import cn.hutool.core.lang.Assert;
+import com.jisco.dynamicweight.dynamicbasebatchstation.mapper.DynamicBaseBatchStationMapper;
+import com.jisco.dynamicweight.dynamicbasebatchstation.model.DynamicBaseBatchStation;
+import com.jisco.dynamicweight.dynamicworkupdata.dto.InbatchDto;
+import com.jisco.dynamicweight.dynamicworkupdata.dto.ReturnedDustDto;
 import com.jisco.dynamicweight.dynamicworkupdata.mapper.DynamicWorkUpdataMapper;
 import com.jisco.dynamicweight.dynamicworkupdata.model.DynamicWorkUpdata;
 import com.jisco.dynamicweight.dynamicworkupdata.service.IDynamicWorkUpdataService;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.AuditDataVO;
+import com.jisco.dynamicweight.dynamicworkupdata.vo.DailyReportVO;
+import com.jisco.dynamicweight.util.UserUtil;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
 
 /**
  * DynamicWorkUpdata服务实现:
@@ -27,16 +44,241 @@ public class DynamicWorkUpdataServiceImpl extends BaseServiceImpl<DynamicWorkUpd
     @Autowired
     private DynamicWorkUpdataMapper dynamicWorkUpdataMapper;
 
+    @Autowired
+    private DynamicBaseBatchStationMapper stationMapper;
+
     @Override
     protected IBaseMapper<DynamicWorkUpdata, String> getMapper() {
         return dynamicWorkUpdataMapper;
     }
 
     /**
-     * 重新计算煤塔秤数据
+     * 重新获取动态秤称重数据
      */
     @Override
     public void recalc() {
         dynamicWorkUpdataMapper.recalc();
     }
+
+    /**
+     * 数据分批总重量
+     * @param stationCode
+     * @return
+     */
+    @Override
+    public BigDecimal inbatchsTotalWeight(String stationCode, Date date) {
+        SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
+        Map<String, Object> params = new HashMap<>();
+        params.put("pikaCode", stationCode);
+        List<DynamicBaseBatchStation> stations = stationMapper.selectByParameters(params);
+        Assert.isTrue(!CollectionUtils.isEmpty(stations), "站点不存在:" + stationCode);
+        Assert.isTrue(stations.size() == 1, "站点存在多条记录:" + stationCode);
+        Date date1 = null;
+        Date date2 = null;
+        try {
+            date1 = sdf.parse(sdf.format(date));
+            date1.setHours(0);
+            date1.setMinutes(0);
+            date1.setSeconds(0);
+            date2 = sdf.parse(sdf.format(date));
+            date2.setHours(23);
+            date2.setMinutes(59);
+            date2.setSeconds(59);
+        } catch (ParseException e) {
+            e.printStackTrace();
+            throw new RuntimeException("日期格式转换错误");
+        }
+        BigDecimal weight = dynamicWorkUpdataMapper.inbatchsTotalWeight(stationCode, date1, date2);
+        return weight;
+    }
+
+    /**
+     * 返粉总重量
+     * @param id
+     * @return
+     */
+    @Override
+    public BigDecimal returnedDustWeight(String id) {
+        DynamicWorkUpdata updata = this.getById(id);
+        Assert.notNull(updata, "记录不存在:" + id);
+        SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
+        Date date1 = null;
+        Date date2 = null;
+        try {
+            date1 = sdf.parse(sdf.format(updata.getEndTime()));
+            date1.setHours(0);
+            date1.setMinutes(0);
+            date1.setSeconds(0);
+            date2 = sdf.parse(sdf.format(updata.getEndTime()));
+            date2.setHours(23);
+            date2.setMinutes(59);
+            date2.setSeconds(59);
+        } catch (ParseException e) {
+            e.printStackTrace();
+            throw new RuntimeException("日期格式转换错误");
+        }
+        BigDecimal weight = null;
+        Map<String, Object> map = new HashMap<>();
+        map.put("meterialCode", updata.getMaterialCode());
+        map.put("date1", date1);
+        map.put("date2", date2);
+        map.put("weight", weight);
+        dynamicWorkUpdataMapper.returnedDustWeight(map);
+        if (map.get("weight") == null) {
+            weight = new BigDecimal(0);
+        }
+        weight = new BigDecimal(map.get("weight").toString());
+        return weight;
+    }
+
+    /**
+     * 返粉
+     * @param id
+     * @param list
+     */
+    @Transactional
+    @Override
+    public void returnedDust(String id, List<ReturnedDustDto> list) {
+        DynamicWorkUpdata updata = this.getById(id);
+        Assert.isTrue(updata.getIsReturnedDust().compareTo(new BigDecimal(1))==0, updata.getMaterialName() + "不能进行返粉!");
+        BigDecimal weight = this.returnedDustWeight(id);
+        Assert.isTrue(weight.compareTo(new BigDecimal(0)) > 0, updata.getStationName() + "重量为0,不能进行返粉!");
+        BigDecimal total = new BigDecimal(0);
+        for (ReturnedDustDto returnedDustDto : list) {
+            DynamicWorkUpdata data = new DynamicWorkUpdata();
+            BeanUtils.copyProperties(updata, data);
+            data.setId(null);
+            data.setUpdataNo(null);
+            data.setMaterialCode(returnedDustDto.getMaterialCode());
+            data.setMaterialName(returnedDustDto.getMaterialName());
+            data.setStationCode(returnedDustDto.getStationCode());
+            data.setStationName(returnedDustDto.getStationName());
+            data.setRecieverCode(returnedDustDto.getRecieverCode());
+            data.setRecieverName(returnedDustDto.getRecieverName());
+            data.setWeight(returnedDustDto.getWeight());
+            data.setCreateManNo(UserUtil.getCurrentUserId());
+            data.setCreateManName(UserUtil.getCurrentUserName());
+            data.setCreateTime(new Date());
+            data.setUpdateManNo(null);
+            data.setUpdateManName(null);
+            data.setUpdateTime(null);
+            this.add(data);
+            total = total.add(data.getWeight());
+        }
+        Assert.isTrue(weight.compareTo(total) == 0, "返粉重量之和与总重量不相等!");
+    }
+
+    @Transactional
+    @Override
+    public void inbatchs(String id, List<InbatchDto> list) {
+        DynamicWorkUpdata updata = this.getById(id);
+        Assert.isTrue(updata.getIsInbatches().compareTo(new BigDecimal(1))==0, updata.getStationName() + "不能进行分批!");
+        BigDecimal weight = this.inbatchsTotalWeight(updata.getStationCode(), updata.getEndTime());
+        Assert.isTrue(weight.compareTo(new BigDecimal(0)) > 0, updata.getStationName() + "重量为0,不能进行分批!");
+        BigDecimal total = new BigDecimal(0);
+        for (InbatchDto inbatchDto : list) {
+            DynamicWorkUpdata data = new DynamicWorkUpdata();
+            BeanUtils.copyProperties(updata, data);
+            data.setId(null);
+            data.setUpdataNo(null);
+            data.setMaterialCode(inbatchDto.getMaterialCode());
+            data.setMaterialName(inbatchDto.getMaterialName());
+            data.setWeight(inbatchDto.getWeight());
+            data.setCreateManNo(UserUtil.getCurrentUserId());
+            data.setCreateManName(UserUtil.getCurrentUserName());
+            data.setCreateTime(new Date());
+            this.add(data);
+            total = total.add(data.getWeight());
+        }
+        Assert.isTrue(weight.compareTo(total) == 0, "分批重量之和与总重量不相等!");
+    }
+
+    /**
+     * 重新计算焦炭量
+     * @param k
+     * @param list
+     */
+    @Transactional
+    @Override
+    public void recalcCoke(BigDecimal k, List<DynamicWorkUpdata> list) {
+        for (DynamicWorkUpdata updata : list) {
+            Assert.isTrue(updata.getIsCoke().compareTo(new BigDecimal(1))==0, updata.getMaterialName() + "不是焦炭,不能计算");
+            updata.setWeight(updata.getWeight().multiply(k));
+            dynamicWorkUpdataMapper.updateByPrimaryKey(updata);
+        }
+    }
+
+    @Override
+    public List<DailyReportVO> dailyReport(String date) {
+        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        LocalDateTime bl8start = null;
+        LocalDateTime bl8end = null;
+        LocalDateTime bl16start = null;
+        LocalDateTime bl16end = null;
+        LocalDateTime bl24start = null;
+        LocalDateTime bl24end = null;
+        LocalDateTime rzlstart = null;
+        LocalDateTime rzlend = null;
+        LocalDateTime yzlstart = null;
+        LocalDateTime yzlend = null;
+        LocalDateTime nzlstart = null;
+        LocalDateTime nzlend = null;
+        bl8start = LocalDateTime.parse(date + " 00:00:00", df);
+        bl8end = LocalDateTime.parse(date + " 07:59:59", df);
+        bl16start = LocalDateTime.parse(date + " 08:00:00", df);
+        bl16end = LocalDateTime.parse(date + " 15:59:59", df);
+        bl24start = LocalDateTime.parse(date + " 16:00:00", df);
+        bl24end = LocalDateTime.parse(date + " 23:59:59", df);
+        rzlstart = LocalDateTime.parse(date + " 00:00:00", df);
+        rzlend = LocalDateTime.parse(date + " 23:59:59", df);
+        yzlstart = LocalDateTime.parse(date + " 00:00:00", df);
+        if (yzlstart.plusMonths(1).withDayOfMonth(1).minusDays(3).isAfter(yzlstart)){
+            yzlstart = yzlstart.withDayOfMonth(1).minusDays(3);
+        } else {
+            yzlstart = yzlstart.plusMonths(1).withDayOfMonth(1).minusDays(3);
+        }
+        yzlend = LocalDateTime.parse(date + " 23:59:59", df);
+//        yzlend = yzlend.plusMonths(1).withDayOfMonth(1).minusDays(3);
+        nzlstart = LocalDateTime.parse(date + " 00:00:00", df);
+        nzlstart = nzlstart.withMonth(1).withDayOfMonth(1);
+        nzlend = LocalDateTime.parse(date + " 23:59:59", df);
+        List<DailyReportVO> dailyReportVOS = dynamicWorkUpdataMapper.dailyReport(bl8start, bl8end, bl16start, bl16end, bl24start, bl24end, rzlstart, rzlend, yzlstart, yzlend, nzlstart, nzlend);
+        return dailyReportVOS;
+    }
+
+    /**
+     * 查询待审核数据
+     * @param date
+     * @return
+     */
+    @Override
+    public List<AuditDataVO> getAuditData(String date) {
+        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        LocalDateTime bl8start = null;
+        LocalDateTime bl8end = null;
+        LocalDateTime bl16start = null;
+        LocalDateTime bl16end = null;
+        LocalDateTime bl24start = null;
+        LocalDateTime bl24end = null;
+        bl8start = LocalDateTime.parse(date + " 00:00:00", df);
+        bl8end = LocalDateTime.parse(date + " 07:59:59", df);
+        bl16start = LocalDateTime.parse(date + " 08:00:00", df);
+        bl16end = LocalDateTime.parse(date + " 15:59:59", df);
+        bl24start = LocalDateTime.parse(date + " 16:00:00", df);
+        bl24end = LocalDateTime.parse(date + " 23:59:59", df);
+        List<AuditDataVO> auditDataVOS = dynamicWorkUpdataMapper.getAuditData(bl8start, bl8end, bl16start, bl16end, bl24start, bl24end);
+        for (AuditDataVO auditDataVO : auditDataVOS) {
+            if (Objects.isNull(auditDataVO.getBl8())){
+                auditDataVO.setBl8(BigDecimal.ZERO);
+            }
+            if (Objects.isNull(auditDataVO.getBl16())){
+                auditDataVO.setBl16(BigDecimal.ZERO);
+            }
+            if (Objects.isNull(auditDataVO.getBl24())){
+                auditDataVO.setBl24(BigDecimal.ZERO);
+            }
+            auditDataVO.setRzl(auditDataVO.getBl8().add(auditDataVO.getBl16()).add(auditDataVO.getBl24()));
+        }
+        return auditDataVOS;
+    }
 }

+ 168 - 0
src/main/java/com/jisco/dynamicweight/dynamicworkupdata/vo/AuditDataVO.java

@@ -0,0 +1,168 @@
+package com.jisco.dynamicweight.dynamicworkupdata.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+public class AuditDataVO {
+    @ApiModelProperty(value="物料编码",required=false)
+    private String materialCode;
+    @ApiModelProperty(value="物料名称",required=false)
+    private String materialName;
+    @ApiModelProperty(value="站点编码",required=false)
+    private String stationCode;
+    @ApiModelProperty(value="站点名称",required=false)
+    private String stationName;
+    @ApiModelProperty(value="收货库房编码",required=false)
+    private String recieverCode;
+    @ApiModelProperty(value="收货库房",required=false)
+    private String recieverName;
+    @ApiModelProperty(value="收货点类型",required=false)
+    private String recieverType;
+    @ApiModelProperty(value="发货库房编码",required=false)
+    private String senderCode;
+    @ApiModelProperty(value="发货库房",required=false)
+    private String senderName;
+    @ApiModelProperty(value="发货点类型",required=false)
+    private String senderType;
+    @ApiModelProperty(value="8:00",required=false)
+    private BigDecimal bl8;
+    @ApiModelProperty(value="16:00",required=false)
+    private BigDecimal bl16;
+    @ApiModelProperty(value="24:00",required=false)
+    private BigDecimal bl24;
+    @ApiModelProperty(value="日累计量",required=false)
+    private BigDecimal rzl;
+
+    public String getMaterialCode() {
+        return materialCode;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode;
+    }
+
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName;
+    }
+
+    public String getStationCode() {
+        return stationCode;
+    }
+
+    public void setStationCode(String stationCode) {
+        this.stationCode = stationCode;
+    }
+
+    public String getStationName() {
+        return stationName;
+    }
+
+    public void setStationName(String stationName) {
+        this.stationName = stationName;
+    }
+
+    public String getRecieverCode() {
+        return recieverCode;
+    }
+
+    public void setRecieverCode(String recieverCode) {
+        this.recieverCode = recieverCode;
+    }
+
+    public String getRecieverName() {
+        return recieverName;
+    }
+
+    public void setRecieverName(String recieverName) {
+        this.recieverName = recieverName;
+    }
+
+    public String getRecieverType() {
+        return recieverType;
+    }
+
+    public void setRecieverType(String recieverType) {
+        this.recieverType = recieverType;
+    }
+
+    public String getSenderCode() {
+        return senderCode;
+    }
+
+    public void setSenderCode(String senderCode) {
+        this.senderCode = senderCode;
+    }
+
+    public String getSenderName() {
+        return senderName;
+    }
+
+    public void setSenderName(String senderName) {
+        this.senderName = senderName;
+    }
+
+    public String getSenderType() {
+        return senderType;
+    }
+
+    public void setSenderType(String senderType) {
+        this.senderType = senderType;
+    }
+
+    public BigDecimal getBl8() {
+        return bl8;
+    }
+
+    public void setBl8(BigDecimal bl8) {
+        this.bl8 = bl8;
+    }
+
+    public BigDecimal getBl16() {
+        return bl16;
+    }
+
+    public void setBl16(BigDecimal bl16) {
+        this.bl16 = bl16;
+    }
+
+    public BigDecimal getBl24() {
+        return bl24;
+    }
+
+    public void setBl24(BigDecimal bl24) {
+        this.bl24 = bl24;
+    }
+
+    public BigDecimal getRzl() {
+        return rzl;
+    }
+
+    public void setRzl(BigDecimal rzl) {
+        this.rzl = rzl;
+    }
+
+    @Override
+    public String toString() {
+        return "AuditDataVO{" +
+                "materialCode='" + materialCode + '\'' +
+                ", materialName='" + materialName + '\'' +
+                ", stationCode='" + stationCode + '\'' +
+                ", stationName='" + stationName + '\'' +
+                ", recieverCode='" + recieverCode + '\'' +
+                ", recieverName='" + recieverName + '\'' +
+                ", recieverType='" + recieverType + '\'' +
+                ", senderCode='" + senderCode + '\'' +
+                ", senderName='" + senderName + '\'' +
+                ", senderType='" + senderType + '\'' +
+                ", bl8=" + bl8 +
+                ", bl16=" + bl16 +
+                ", bl24=" + bl24 +
+                ", rzl=" + rzl +
+                '}';
+    }
+}

+ 124 - 0
src/main/java/com/jisco/dynamicweight/dynamicworkupdata/vo/DailyReportVO.java

@@ -0,0 +1,124 @@
+package com.jisco.dynamicweight.dynamicworkupdata.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+public class DailyReportVO {
+    @ApiModelProperty(value="物料名称",required=false)
+    private String materialName;
+    @ApiModelProperty(value="站点名称",required=false)
+    private String stationName;
+    @ApiModelProperty(value="收货库房",required=false)
+    private String recieverName;
+    @ApiModelProperty(value="发货库房",required=false)
+    private String senderName;
+    @ApiModelProperty(value="8:00",required=false)
+    private BigDecimal bl8;
+    @ApiModelProperty(value="16:00",required=false)
+    private BigDecimal bl16;
+    @ApiModelProperty(value="24:00",required=false)
+    private BigDecimal bl24;
+    @ApiModelProperty(value="日累计量",required=false)
+    private BigDecimal rzl;
+    @ApiModelProperty(value="月累计量",required=false)
+    private BigDecimal yzl;
+    @ApiModelProperty(value="年累计量",required=false)
+    private BigDecimal nzl;
+
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName;
+    }
+
+    public String getStationName() {
+        return stationName;
+    }
+
+    public void setStationName(String stationName) {
+        this.stationName = stationName;
+    }
+
+    public String getRecieverName() {
+        return recieverName;
+    }
+
+    public void setRecieverName(String recieverName) {
+        this.recieverName = recieverName;
+    }
+
+    public String getSenderName() {
+        return senderName;
+    }
+
+    public void setSenderName(String senderName) {
+        this.senderName = senderName;
+    }
+
+    public BigDecimal getBl8() {
+        return bl8;
+    }
+
+    public void setBl8(BigDecimal bl8) {
+        this.bl8 = bl8;
+    }
+
+    public BigDecimal getBl16() {
+        return bl16;
+    }
+
+    public void setBl16(BigDecimal bl16) {
+        this.bl16 = bl16;
+    }
+
+    public BigDecimal getBl24() {
+        return bl24;
+    }
+
+    public void setBl24(BigDecimal bl24) {
+        this.bl24 = bl24;
+    }
+
+    public BigDecimal getRzl() {
+        return rzl;
+    }
+
+    public void setRzl(BigDecimal rzl) {
+        this.rzl = rzl;
+    }
+
+    public BigDecimal getYzl() {
+        return yzl;
+    }
+
+    public void setYzl(BigDecimal yzl) {
+        this.yzl = yzl;
+    }
+
+    public BigDecimal getNzl() {
+        return nzl;
+    }
+
+    public void setNzl(BigDecimal nzl) {
+        this.nzl = nzl;
+    }
+
+    @Override
+    public String toString() {
+        return "DailyReportVO{" +
+                "materialName='" + materialName + '\'' +
+                ", stationName='" + stationName + '\'' +
+                ", recieverName='" + recieverName + '\'' +
+                ", senderName='" + senderName + '\'' +
+                ", bl8=" + bl8 +
+                ", bl16=" + bl16 +
+                ", bl24=" + bl24 +
+                ", rzl=" + rzl +
+                ", yzl=" + yzl +
+                ", nzl=" + nzl +
+                '}';
+    }
+}

+ 106 - 0
src/main/java/com/jisco/dynamicweight/pika/controller/CenternetController.java

@@ -0,0 +1,106 @@
+package com.jisco.dynamicweight.pika.controller;
+
+import com.jisco.dynamicweight.pika.model.Centernet;
+import com.jisco.dynamicweight.pika.service.ICenternetService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * Centernet RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-02-11 11:33
+ * 类描述
+ * 修订历史:
+ * 日期:2022-02-11
+ * 作者:generator
+ * 参考:
+ * 描述:Centernet RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/centernets")
+public class CenternetController extends BaseRESTfulController {
+
+    @Autowired
+    ICenternetService centernetService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("centernet:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<Centernet> list = centernetService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("centernet:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<Centernet> list = centernetService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据Centernet对象创建")
+    @ApiImplicitParam(name = "centernet", value = "详细实体centernet", required = true, dataType = "Centernet")
+    //@RequiresPermissions("centernet:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@RequestBody Centernet model){
+        Centernet centernet = centernetService.add(model);
+        return success(centernet);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("centernet:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        Centernet centernet = centernetService.getById(id);
+        return success(centernet);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的centernet信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "centernet", value = "详细实体centernet", required = true, dataType = "Centernet")
+    })
+    //@RequiresPermissions("centernet:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody Centernet model){
+        model.setId(id);
+        Centernet centernet = centernetService.modify(model);
+        return success(centernet);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("centernet:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  centernetService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 9 - 0
src/main/java/com/jisco/dynamicweight/pika/mapper/CenternetMapper.java

@@ -0,0 +1,9 @@
+package com.jisco.dynamicweight.pika.mapper;
+
+import com.jisco.dynamicweight.pika.model.Centernet;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface CenternetMapper extends IBaseMapper<Centernet, String> {
+}

+ 2417 - 0
src/main/java/com/jisco/dynamicweight/pika/mapper/CenternetMapper.xml

@@ -0,0 +1,2417 @@
+<?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.jisco.dynamicweight.pika.mapper.CenternetMapper">
+    <resultMap id="BaseResultMap" type="com.jisco.dynamicweight.pika.model.Centernet">
+        <id column="Identity" jdbcType="VARCHAR" property="identity"/>
+        <result column="MeasureBill" jdbcType="VARCHAR" property="measurebill"/>
+        <result column="TrustBillNum" jdbcType="VARCHAR" property="trustbillnum"/>
+        <result column="VoucherIdentity" jdbcType="VARCHAR" property="voucheridentity"/>
+        <result column="VoucherItem" jdbcType="VARCHAR" property="voucheritem"/>
+        <result column="BusinessGroup" jdbcType="VARCHAR" property="businessgroup"/>
+        <result column="BusinessType" jdbcType="VARCHAR" property="businesstype"/>
+        <result column="StationType" jdbcType="VARCHAR" property="stationtype"/>
+        <result column="MeasureObjectType" jdbcType="VARCHAR" property="measureobjecttype"/>
+        <result column="Conveyance" jdbcType="VARCHAR" property="conveyance"/>
+        <result column="Trailer" jdbcType="VARCHAR" property="trailer"/>
+        <result column="TempConveyance" jdbcType="VARCHAR" property="tempconveyance"/>
+        <result column="ConveyanceGroup" jdbcType="VARCHAR" property="conveyancegroup"/>
+        <result column="ConveyanceType" jdbcType="VARCHAR" property="conveyancetype"/>
+        <result column="ResourceSystem" jdbcType="VARCHAR" property="resourcesystem"/>
+        <result column="GroupPackageAmount" jdbcType="DECIMAL" property="grouppackageamount"/>
+        <result column="GroupPackageUnit" jdbcType="VARCHAR" property="grouppackageunit"/>
+        <result column="PackageAmount" jdbcType="DECIMAL" property="packageamount"/>
+        <result column="PackageUnit" jdbcType="VARCHAR" property="packageunit"/>
+        <result column="TheoryAmount" jdbcType="DECIMAL" property="theoryamount"/>
+        <result column="Gross" jdbcType="DECIMAL" property="gross"/>
+        <result column="Tare" jdbcType="DECIMAL" property="tare"/>
+        <result column="PonderationAmount" jdbcType="DECIMAL" property="ponderationamount"/>
+        <result column="MeasureBatch" jdbcType="VARCHAR" property="measurebatch"/>
+        <result column="MeasureBatchCount" jdbcType="DECIMAL" property="measurebatchcount"/>
+        <result column="MeasureTaskNum" jdbcType="VARCHAR" property="measuretasknum"/>
+        <result column="SenderType" jdbcType="VARCHAR" property="sendertype"/>
+        <result column="SenderName" jdbcType="VARCHAR" property="sendername"/>
+        <result column="Sender" jdbcType="VARCHAR" property="sender"/>
+        <result column="SenderRemark" jdbcType="VARCHAR" property="senderremark"/>
+        <result column="ReceiverType" jdbcType="VARCHAR" property="receivertype"/>
+        <result column="ReceiverName" jdbcType="VARCHAR" property="receivername"/>
+        <result column="Receiver" jdbcType="VARCHAR" property="receiver"/>
+        <result column="ReceiverRemark" jdbcType="VARCHAR" property="receiverremark"/>
+        <result column="MaterialName" jdbcType="VARCHAR" property="materialname"/>
+        <result column="Material" jdbcType="VARCHAR" property="material"/>
+        <result column="TareSystem" jdbcType="VARCHAR" property="taresystem"/>
+        <result column="GrossSystem" jdbcType="VARCHAR" property="grosssystem"/>
+        <result column="NetSystem" jdbcType="VARCHAR" property="netsystem"/>
+        <result column="TareDataResourceType" jdbcType="VARCHAR" property="taredataresourcetype"/>
+        <result column="GrossDataResourceType" jdbcType="VARCHAR" property="grossdataresourcetype"/>
+        <result column="NetDataResourceType" jdbcType="VARCHAR" property="netdataresourcetype"/>
+        <result column="TareTime" jdbcType="TIMESTAMP" property="taretime"/>
+        <result column="GrossTime" jdbcType="TIMESTAMP" property="grosstime"/>
+        <result column="NetTime" jdbcType="TIMESTAMP" property="nettime"/>
+        <result column="TareStationName" jdbcType="VARCHAR" property="tarestationname"/>
+        <result column="TareStation" jdbcType="VARCHAR" property="tarestation"/>
+        <result column="GrossStationName" jdbcType="VARCHAR" property="grossstationname"/>
+        <result column="GrossStation" jdbcType="VARCHAR" property="grossstation"/>
+        <result column="NetStationName" jdbcType="VARCHAR" property="netstationname"/>
+        <result column="NetStation" jdbcType="VARCHAR" property="netstation"/>
+        <result column="TareWeightor" jdbcType="VARCHAR" property="tareweightor"/>
+        <result column="GrossWeightor" jdbcType="VARCHAR" property="grossweightor"/>
+        <result column="NetWeightor" jdbcType="VARCHAR" property="netweightor"/>
+        <result column="BatchIdentity" jdbcType="VARCHAR" property="batchidentity"/>
+        <result column="BusinessState" jdbcType="VARCHAR" property="businessstate"/>
+        <result column="BillType" jdbcType="VARCHAR" property="billtype"/>
+        <result column="MeasureType" jdbcType="VARCHAR" property="measuretype"/>
+        <result column="AmountUnit" jdbcType="VARCHAR" property="amountunit"/>
+        <result column="DownloadedTag" jdbcType="VARCHAR" property="downloadedtag"/>
+        <result column="DeletedTag" jdbcType="VARCHAR" property="deletedtag"/>
+        <result column="Creator" jdbcType="VARCHAR" property="creator"/>
+        <result column="CreateDate" jdbcType="TIMESTAMP" property="createdate"/>
+        <result column="Changer" jdbcType="VARCHAR" property="changer"/>
+        <result column="ChangeDate" jdbcType="TIMESTAMP" property="changedate"/>
+    </resultMap>
+    <sql id="columns">
+        "Identity"
+        , "MeasureBill", "TrustBillNum", "VoucherIdentity", "VoucherItem", "BusinessGroup",
+    "BusinessType", "StationType", "MeasureObjectType", "Conveyance", "Trailer", "TempConveyance",
+    "ConveyanceGroup", "ConveyanceType", "ResourceSystem", "GroupPackageAmount", "GroupPackageUnit",
+    "PackageAmount", "PackageUnit", "TheoryAmount", "Gross", "Tare", "PonderationAmount", "MeasureBatch",
+    "MeasureBatchCount", "MeasureTaskNum", "SenderType", "SenderName", "Sender", "SenderRemark",
+    "ReceiverType", "ReceiverName", "Receiver", "ReceiverRemark", "MaterialName", "Material", "TareSystem",
+    "GrossSystem", "NetSystem", "TareDataResourceType", "GrossDataResourceType", "NetDataResourceType",
+    "TareTime", "GrossTime", "NetTime", "TareStationName", "TareStation", "GrossStationName", "GrossStation",
+    "NetStationName", "NetStation", "TareWeightor", "GrossWeightor", "NetWeightor", "BatchIdentity",
+    "BusinessState", "BillType", "MeasureType", "AmountUnit", "DownloadedTag", "DeletedTag", "Creator",
+    "CreateDate", "Changer", "ChangeDate"
+    </sql>
+    <sql id="columns_alias">
+        t
+        .
+        Identity
+        , t.MeasureBill, t.TrustBillNum, t.VoucherIdentity, t.VoucherItem, t.BusinessGroup,
+    t.BusinessType, t.StationType, t.MeasureObjectType, t.Conveyance, t.Trailer, t.TempConveyance, 
+    t.ConveyanceGroup, t.ConveyanceType, t.ResourceSystem, t.GroupPackageAmount, t.GroupPackageUnit, 
+    t.PackageAmount, t.PackageUnit, t.TheoryAmount, t.Gross, t.Tare, t.PonderationAmount, 
+    t.MeasureBatch, t.MeasureBatchCount, t.MeasureTaskNum, t.SenderType, t.SenderName, 
+    t.Sender, t.SenderRemark, t.ReceiverType, t.ReceiverName, t.Receiver, t.ReceiverRemark, 
+    t.MaterialName, t.Material, t.TareSystem, t.GrossSystem, t.NetSystem, t.TareDataResourceType, 
+    t.GrossDataResourceType, t.NetDataResourceType, t.TareTime, t.GrossTime, t.NetTime, 
+    t.TareStationName, t.TareStation, t.GrossStationName, t.GrossStation, t.NetStationName, 
+    t.NetStation, t.TareWeightor, t.GrossWeightor, t.NetWeightor, t.BatchIdentity, t.BusinessState, 
+    t.BillType, t.MeasureType, t.AmountUnit, t.DownloadedTag, t.DeletedTag, t.Creator, 
+    t.CreateDate, t.Changer, t.ChangeDate
+    </sql>
+    <sql id="select">
+        SELECT
+        <include refid="columns"/>
+        FROM jgshared."CenterNet"@PIKATEST
+    </sql>
+    <sql id="select_alias">
+        SELECT
+        <include refid="columns_alias"/>
+        FROM jgshared."CenterNet"@PIKATEST t
+    </sql>
+    <sql id="where">
+        <where>
+            <if test="identity != null and identity != ''">
+                and Identity = #{identity}
+            </if>
+            <if test="measurebill != null and measurebill != ''">
+                and MeasureBill = #{measurebill}
+            </if>
+            <if test="trustbillnum != null and trustbillnum != ''">
+                and TrustBillNum = #{trustbillnum}
+            </if>
+            <if test="voucheridentity != null and voucheridentity != ''">
+                and VoucherIdentity = #{voucheridentity}
+            </if>
+            <if test="voucheritem != null and voucheritem != ''">
+                and VoucherItem = #{voucheritem}
+            </if>
+            <if test="businessgroup != null and businessgroup != ''">
+                and BusinessGroup = #{businessgroup}
+            </if>
+            <if test="businesstype != null and businesstype != ''">
+                and BusinessType = #{businesstype}
+            </if>
+            <if test="stationtype != null and stationtype != ''">
+                and StationType = #{stationtype}
+            </if>
+            <if test="measureobjecttype != null and measureobjecttype != ''">
+                and MeasureObjectType = #{measureobjecttype}
+            </if>
+            <if test="conveyance != null and conveyance != ''">
+                and Conveyance = #{conveyance}
+            </if>
+            <if test="trailer != null and trailer != ''">
+                and Trailer = #{trailer}
+            </if>
+            <if test="tempconveyance != null and tempconveyance != ''">
+                and TempConveyance = #{tempconveyance}
+            </if>
+            <if test="conveyancegroup != null and conveyancegroup != ''">
+                and ConveyanceGroup = #{conveyancegroup}
+            </if>
+            <if test="conveyancetype != null and conveyancetype != ''">
+                and ConveyanceType = #{conveyancetype}
+            </if>
+            <if test="resourcesystem != null and resourcesystem != ''">
+                and ResourceSystem = #{resourcesystem}
+            </if>
+            <if test="grouppackageamount != null">
+                and GroupPackageAmount = #{grouppackageamount}
+            </if>
+            <if test="grouppackageunit != null and grouppackageunit != ''">
+                and GroupPackageUnit = #{grouppackageunit}
+            </if>
+            <if test="packageamount != null">
+                and PackageAmount = #{packageamount}
+            </if>
+            <if test="packageunit != null and packageunit != ''">
+                and PackageUnit = #{packageunit}
+            </if>
+            <if test="theoryamount != null">
+                and TheoryAmount = #{theoryamount}
+            </if>
+            <if test="gross != null">
+                and Gross = #{gross}
+            </if>
+            <if test="tare != null">
+                and Tare = #{tare}
+            </if>
+            <if test="ponderationamount != null">
+                and PonderationAmount = #{ponderationamount}
+            </if>
+            <if test="measurebatch != null and measurebatch != ''">
+                and MeasureBatch = #{measurebatch}
+            </if>
+            <if test="measurebatchcount != null">
+                and MeasureBatchCount = #{measurebatchcount}
+            </if>
+            <if test="measuretasknum != null and measuretasknum != ''">
+                and MeasureTaskNum = #{measuretasknum}
+            </if>
+            <if test="sendertype != null and sendertype != ''">
+                and SenderType = #{sendertype}
+            </if>
+            <if test="sendername != null and sendername != ''">
+                and SenderName = #{sendername}
+            </if>
+            <if test="sender != null and sender != ''">
+                and Sender = #{sender}
+            </if>
+            <if test="senderremark != null and senderremark != ''">
+                and SenderRemark = #{senderremark}
+            </if>
+            <if test="receivertype != null and receivertype != ''">
+                and ReceiverType = #{receivertype}
+            </if>
+            <if test="receivername != null and receivername != ''">
+                and ReceiverName = #{receivername}
+            </if>
+            <if test="receiver != null and receiver != ''">
+                and Receiver = #{receiver}
+            </if>
+            <if test="receiverremark != null and receiverremark != ''">
+                and ReceiverRemark = #{receiverremark}
+            </if>
+            <if test="materialname != null and materialname != ''">
+                and MaterialName = #{materialname}
+            </if>
+            <if test="material != null and material != ''">
+                and Material = #{material}
+            </if>
+            <if test="taresystem != null and taresystem != ''">
+                and TareSystem = #{taresystem}
+            </if>
+            <if test="grosssystem != null and grosssystem != ''">
+                and GrossSystem = #{grosssystem}
+            </if>
+            <if test="netsystem != null and netsystem != ''">
+                and NetSystem = #{netsystem}
+            </if>
+            <if test="taredataresourcetype != null and taredataresourcetype != ''">
+                and TareDataResourceType = #{taredataresourcetype}
+            </if>
+            <if test="grossdataresourcetype != null and grossdataresourcetype != ''">
+                and GrossDataResourceType = #{grossdataresourcetype}
+            </if>
+            <if test="netdataresourcetype != null and netdataresourcetype != ''">
+                and NetDataResourceType = #{netdataresourcetype}
+            </if>
+            <if test="taretime != null">
+                and TO_CHAR(TareTime,'yyyy-MM-dd') = #{taretime}
+            </if>
+            <if test="grosstime != null">
+                and TO_CHAR(GrossTime,'yyyy-MM-dd') = #{grosstime}
+            </if>
+            <if test="nettime != null">
+                and TO_CHAR(NetTime,'yyyy-MM-dd') = #{nettime}
+            </if>
+            <if test="tarestationname != null and tarestationname != ''">
+                and TareStationName = #{tarestationname}
+            </if>
+            <if test="tarestation != null and tarestation != ''">
+                and TareStation = #{tarestation}
+            </if>
+            <if test="grossstationname != null and grossstationname != ''">
+                and GrossStationName = #{grossstationname}
+            </if>
+            <if test="grossstation != null and grossstation != ''">
+                and GrossStation = #{grossstation}
+            </if>
+            <if test="netstationname != null and netstationname != ''">
+                and NetStationName = #{netstationname}
+            </if>
+            <if test="netstation != null and netstation != ''">
+                and NetStation = #{netstation}
+            </if>
+            <if test="tareweightor != null and tareweightor != ''">
+                and TareWeightor = #{tareweightor}
+            </if>
+            <if test="grossweightor != null and grossweightor != ''">
+                and GrossWeightor = #{grossweightor}
+            </if>
+            <if test="netweightor != null and netweightor != ''">
+                and NetWeightor = #{netweightor}
+            </if>
+            <if test="batchidentity != null and batchidentity != ''">
+                and BatchIdentity = #{batchidentity}
+            </if>
+            <if test="businessstate != null and businessstate != ''">
+                and BusinessState = #{businessstate}
+            </if>
+            <if test="billtype != null and billtype != ''">
+                and BillType = #{billtype}
+            </if>
+            <if test="measuretype != null and measuretype != ''">
+                and MeasureType = #{measuretype}
+            </if>
+            <if test="amountunit != null and amountunit != ''">
+                and AmountUnit = #{amountunit}
+            </if>
+            <if test="downloadedtag != null and downloadedtag != ''">
+                and DownloadedTag = #{downloadedtag}
+            </if>
+            <if test="deletedtag != null and deletedtag != ''">
+                and DeletedTag = #{deletedtag}
+            </if>
+            <if test="creator != null and creator != ''">
+                and Creator = #{creator}
+            </if>
+            <if test="createdate != null">
+                and TO_CHAR(CreateDate,'yyyy-MM-dd') = #{createdate}
+            </if>
+            <if test="changer != null and changer != ''">
+                and Changer = #{changer}
+            </if>
+            <if test="changedate != null">
+                and TO_CHAR(ChangeDate,'yyyy-MM-dd') = #{changedate}
+            </if>
+        </where>
+    </sql>
+    <sql id="whereLike">
+        <where>
+            <if test="identity != null and identity != ''">
+                and Identity LIKE '%${identity}%'
+            </if>
+            <if test="measurebill != null and measurebill != ''">
+                and MeasureBill LIKE '%${measurebill}%'
+            </if>
+            <if test="trustbillnum != null and trustbillnum != ''">
+                and TrustBillNum LIKE '%${trustbillnum}%'
+            </if>
+            <if test="voucheridentity != null and voucheridentity != ''">
+                and VoucherIdentity LIKE '%${voucheridentity}%'
+            </if>
+            <if test="voucheritem != null and voucheritem != ''">
+                and VoucherItem LIKE '%${voucheritem}%'
+            </if>
+            <if test="businessgroup != null and businessgroup != ''">
+                and BusinessGroup LIKE '%${businessgroup}%'
+            </if>
+            <if test="businesstype != null and businesstype != ''">
+                and BusinessType LIKE '%${businesstype}%'
+            </if>
+            <if test="stationtype != null and stationtype != ''">
+                and StationType LIKE '%${stationtype}%'
+            </if>
+            <if test="measureobjecttype != null and measureobjecttype != ''">
+                and MeasureObjectType LIKE '%${measureobjecttype}%'
+            </if>
+            <if test="conveyance != null and conveyance != ''">
+                and Conveyance LIKE '%${conveyance}%'
+            </if>
+            <if test="trailer != null and trailer != ''">
+                and Trailer LIKE '%${trailer}%'
+            </if>
+            <if test="tempconveyance != null and tempconveyance != ''">
+                and TempConveyance LIKE '%${tempconveyance}%'
+            </if>
+            <if test="conveyancegroup != null and conveyancegroup != ''">
+                and ConveyanceGroup LIKE '%${conveyancegroup}%'
+            </if>
+            <if test="conveyancetype != null and conveyancetype != ''">
+                and ConveyanceType LIKE '%${conveyancetype}%'
+            </if>
+            <if test="resourcesystem != null and resourcesystem != ''">
+                and ResourceSystem LIKE '%${resourcesystem}%'
+            </if>
+            <if test="grouppackageamount != null">
+                and GroupPackageAmount = #{grouppackageamount}
+            </if>
+            <if test="grouppackageunit != null and grouppackageunit != ''">
+                and GroupPackageUnit LIKE '%${grouppackageunit}%'
+            </if>
+            <if test="packageamount != null">
+                and PackageAmount = #{packageamount}
+            </if>
+            <if test="packageunit != null and packageunit != ''">
+                and PackageUnit LIKE '%${packageunit}%'
+            </if>
+            <if test="theoryamount != null">
+                and TheoryAmount = #{theoryamount}
+            </if>
+            <if test="gross != null">
+                and Gross = #{gross}
+            </if>
+            <if test="tare != null">
+                and Tare = #{tare}
+            </if>
+            <if test="ponderationamount != null">
+                and PonderationAmount = #{ponderationamount}
+            </if>
+            <if test="measurebatch != null and measurebatch != ''">
+                and MeasureBatch LIKE '%${measurebatch}%'
+            </if>
+            <if test="measurebatchcount != null">
+                and MeasureBatchCount = #{measurebatchcount}
+            </if>
+            <if test="measuretasknum != null and measuretasknum != ''">
+                and MeasureTaskNum LIKE '%${measuretasknum}%'
+            </if>
+            <if test="sendertype != null and sendertype != ''">
+                and SenderType LIKE '%${sendertype}%'
+            </if>
+            <if test="sendername != null and sendername != ''">
+                and SenderName LIKE '%${sendername}%'
+            </if>
+            <if test="sender != null and sender != ''">
+                and Sender LIKE '%${sender}%'
+            </if>
+            <if test="senderremark != null and senderremark != ''">
+                and SenderRemark LIKE '%${senderremark}%'
+            </if>
+            <if test="receivertype != null and receivertype != ''">
+                and ReceiverType LIKE '%${receivertype}%'
+            </if>
+            <if test="receivername != null and receivername != ''">
+                and ReceiverName LIKE '%${receivername}%'
+            </if>
+            <if test="receiver != null and receiver != ''">
+                and Receiver LIKE '%${receiver}%'
+            </if>
+            <if test="receiverremark != null and receiverremark != ''">
+                and ReceiverRemark LIKE '%${receiverremark}%'
+            </if>
+            <if test="materialname != null and materialname != ''">
+                and MaterialName LIKE '%${materialname}%'
+            </if>
+            <if test="material != null and material != ''">
+                and Material LIKE '%${material}%'
+            </if>
+            <if test="taresystem != null and taresystem != ''">
+                and TareSystem LIKE '%${taresystem}%'
+            </if>
+            <if test="grosssystem != null and grosssystem != ''">
+                and GrossSystem LIKE '%${grosssystem}%'
+            </if>
+            <if test="netsystem != null and netsystem != ''">
+                and NetSystem LIKE '%${netsystem}%'
+            </if>
+            <if test="taredataresourcetype != null and taredataresourcetype != ''">
+                and TareDataResourceType LIKE '%${taredataresourcetype}%'
+            </if>
+            <if test="grossdataresourcetype != null and grossdataresourcetype != ''">
+                and GrossDataResourceType LIKE '%${grossdataresourcetype}%'
+            </if>
+            <if test="netdataresourcetype != null and netdataresourcetype != ''">
+                and NetDataResourceType LIKE '%${netdataresourcetype}%'
+            </if>
+            <if test="taretime != null">
+                and TO_CHAR(TareTime,'yyyy-MM-dd') = #{taretime}
+            </if>
+            <if test="grosstime != null">
+                and TO_CHAR(GrossTime,'yyyy-MM-dd') = #{grosstime}
+            </if>
+            <if test="nettime != null">
+                and TO_CHAR(NetTime,'yyyy-MM-dd') = #{nettime}
+            </if>
+            <if test="tarestationname != null and tarestationname != ''">
+                and TareStationName LIKE '%${tarestationname}%'
+            </if>
+            <if test="tarestation != null and tarestation != ''">
+                and TareStation LIKE '%${tarestation}%'
+            </if>
+            <if test="grossstationname != null and grossstationname != ''">
+                and GrossStationName LIKE '%${grossstationname}%'
+            </if>
+            <if test="grossstation != null and grossstation != ''">
+                and GrossStation LIKE '%${grossstation}%'
+            </if>
+            <if test="netstationname != null and netstationname != ''">
+                and NetStationName LIKE '%${netstationname}%'
+            </if>
+            <if test="netstation != null and netstation != ''">
+                and NetStation LIKE '%${netstation}%'
+            </if>
+            <if test="tareweightor != null and tareweightor != ''">
+                and TareWeightor LIKE '%${tareweightor}%'
+            </if>
+            <if test="grossweightor != null and grossweightor != ''">
+                and GrossWeightor LIKE '%${grossweightor}%'
+            </if>
+            <if test="netweightor != null and netweightor != ''">
+                and NetWeightor LIKE '%${netweightor}%'
+            </if>
+            <if test="batchidentity != null and batchidentity != ''">
+                and BatchIdentity LIKE '%${batchidentity}%'
+            </if>
+            <if test="businessstate != null and businessstate != ''">
+                and BusinessState LIKE '%${businessstate}%'
+            </if>
+            <if test="billtype != null and billtype != ''">
+                and BillType LIKE '%${billtype}%'
+            </if>
+            <if test="measuretype != null and measuretype != ''">
+                and MeasureType LIKE '%${measuretype}%'
+            </if>
+            <if test="amountunit != null and amountunit != ''">
+                and AmountUnit LIKE '%${amountunit}%'
+            </if>
+            <if test="downloadedtag != null and downloadedtag != ''">
+                and DownloadedTag LIKE '%${downloadedtag}%'
+            </if>
+            <if test="deletedtag != null and deletedtag != ''">
+                and DeletedTag LIKE '%${deletedtag}%'
+            </if>
+            <if test="creator != null and creator != ''">
+                and Creator LIKE '%${creator}%'
+            </if>
+            <if test="createdate != null">
+                and TO_CHAR(CreateDate,'yyyy-MM-dd') = #{createdate}
+            </if>
+            <if test="changer != null and changer != ''">
+                and Changer LIKE '%${changer}%'
+            </if>
+            <if test="changedate != null">
+                and TO_CHAR(ChangeDate,'yyyy-MM-dd') = #{changedate}
+            </if>
+        </where>
+    </sql>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+        delete
+        from jgshared."CenterNet"@PIKATEST
+        where Identity = #{identity,jdbcType=VARCHAR}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from jgshared."CenterNet"@PIKATEST
+        where 1!=1
+        <if test="measurebill != null and measurebill != ''">
+            or MeasureBill = #{measurebill}
+        </if>
+        <if test="trustbillnum != null and trustbillnum != ''">
+            or TrustBillNum = #{trustbillnum}
+        </if>
+        <if test="voucheridentity != null and voucheridentity != ''">
+            or VoucherIdentity = #{voucheridentity}
+        </if>
+        <if test="voucheritem != null and voucheritem != ''">
+            or VoucherItem = #{voucheritem}
+        </if>
+        <if test="businessgroup != null and businessgroup != ''">
+            or BusinessGroup = #{businessgroup}
+        </if>
+        <if test="businesstype != null and businesstype != ''">
+            or BusinessType = #{businesstype}
+        </if>
+        <if test="stationtype != null and stationtype != ''">
+            or StationType = #{stationtype}
+        </if>
+        <if test="measureobjecttype != null and measureobjecttype != ''">
+            or MeasureObjectType = #{measureobjecttype}
+        </if>
+        <if test="conveyance != null and conveyance != ''">
+            or Conveyance = #{conveyance}
+        </if>
+        <if test="trailer != null and trailer != ''">
+            or Trailer = #{trailer}
+        </if>
+        <if test="tempconveyance != null and tempconveyance != ''">
+            or TempConveyance = #{tempconveyance}
+        </if>
+        <if test="conveyancegroup != null and conveyancegroup != ''">
+            or ConveyanceGroup = #{conveyancegroup}
+        </if>
+        <if test="conveyancetype != null and conveyancetype != ''">
+            or ConveyanceType = #{conveyancetype}
+        </if>
+        <if test="resourcesystem != null and resourcesystem != ''">
+            or ResourceSystem = #{resourcesystem}
+        </if>
+        <if test="grouppackageamount != null">
+            or GroupPackageAmount = #{grouppackageamount}
+        </if>
+        <if test="grouppackageunit != null and grouppackageunit != ''">
+            or GroupPackageUnit = #{grouppackageunit}
+        </if>
+        <if test="packageamount != null">
+            or PackageAmount = #{packageamount}
+        </if>
+        <if test="packageunit != null and packageunit != ''">
+            or PackageUnit = #{packageunit}
+        </if>
+        <if test="theoryamount != null">
+            or TheoryAmount = #{theoryamount}
+        </if>
+        <if test="gross != null">
+            or Gross = #{gross}
+        </if>
+        <if test="tare != null">
+            or Tare = #{tare}
+        </if>
+        <if test="ponderationamount != null">
+            or PonderationAmount = #{ponderationamount}
+        </if>
+        <if test="measurebatch != null and measurebatch != ''">
+            or MeasureBatch = #{measurebatch}
+        </if>
+        <if test="measurebatchcount != null">
+            or MeasureBatchCount = #{measurebatchcount}
+        </if>
+        <if test="measuretasknum != null and measuretasknum != ''">
+            or MeasureTaskNum = #{measuretasknum}
+        </if>
+        <if test="sendertype != null and sendertype != ''">
+            or SenderType = #{sendertype}
+        </if>
+        <if test="sendername != null and sendername != ''">
+            or SenderName = #{sendername}
+        </if>
+        <if test="sender != null and sender != ''">
+            or Sender = #{sender}
+        </if>
+        <if test="senderremark != null and senderremark != ''">
+            or SenderRemark = #{senderremark}
+        </if>
+        <if test="receivertype != null and receivertype != ''">
+            or ReceiverType = #{receivertype}
+        </if>
+        <if test="receivername != null and receivername != ''">
+            or ReceiverName = #{receivername}
+        </if>
+        <if test="receiver != null and receiver != ''">
+            or Receiver = #{receiver}
+        </if>
+        <if test="receiverremark != null and receiverremark != ''">
+            or ReceiverRemark = #{receiverremark}
+        </if>
+        <if test="materialname != null and materialname != ''">
+            or MaterialName = #{materialname}
+        </if>
+        <if test="material != null and material != ''">
+            or Material = #{material}
+        </if>
+        <if test="taresystem != null and taresystem != ''">
+            or TareSystem = #{taresystem}
+        </if>
+        <if test="grosssystem != null and grosssystem != ''">
+            or GrossSystem = #{grosssystem}
+        </if>
+        <if test="netsystem != null and netsystem != ''">
+            or NetSystem = #{netsystem}
+        </if>
+        <if test="taredataresourcetype != null and taredataresourcetype != ''">
+            or TareDataResourceType = #{taredataresourcetype}
+        </if>
+        <if test="grossdataresourcetype != null and grossdataresourcetype != ''">
+            or GrossDataResourceType = #{grossdataresourcetype}
+        </if>
+        <if test="netdataresourcetype != null and netdataresourcetype != ''">
+            or NetDataResourceType = #{netdataresourcetype}
+        </if>
+        <if test="taretime != null">
+            or TO_CHAR(TareTime,'yyyy-MM-dd') = '#{taretime}'
+        </if>
+        <if test="grosstime != null">
+            or TO_CHAR(GrossTime,'yyyy-MM-dd') = '#{grosstime}'
+        </if>
+        <if test="nettime != null">
+            or TO_CHAR(NetTime,'yyyy-MM-dd') = '#{nettime}'
+        </if>
+        <if test="tarestationname != null and tarestationname != ''">
+            or TareStationName = #{tarestationname}
+        </if>
+        <if test="tarestation != null and tarestation != ''">
+            or TareStation = #{tarestation}
+        </if>
+        <if test="grossstationname != null and grossstationname != ''">
+            or GrossStationName = #{grossstationname}
+        </if>
+        <if test="grossstation != null and grossstation != ''">
+            or GrossStation = #{grossstation}
+        </if>
+        <if test="netstationname != null and netstationname != ''">
+            or NetStationName = #{netstationname}
+        </if>
+        <if test="netstation != null and netstation != ''">
+            or NetStation = #{netstation}
+        </if>
+        <if test="tareweightor != null and tareweightor != ''">
+            or TareWeightor = #{tareweightor}
+        </if>
+        <if test="grossweightor != null and grossweightor != ''">
+            or GrossWeightor = #{grossweightor}
+        </if>
+        <if test="netweightor != null and netweightor != ''">
+            or NetWeightor = #{netweightor}
+        </if>
+        <if test="batchidentity != null and batchidentity != ''">
+            or BatchIdentity = #{batchidentity}
+        </if>
+        <if test="businessstate != null and businessstate != ''">
+            or BusinessState = #{businessstate}
+        </if>
+        <if test="billtype != null and billtype != ''">
+            or BillType = #{billtype}
+        </if>
+        <if test="measuretype != null and measuretype != ''">
+            or MeasureType = #{measuretype}
+        </if>
+        <if test="amountunit != null and amountunit != ''">
+            or AmountUnit = #{amountunit}
+        </if>
+        <if test="downloadedtag != null and downloadedtag != ''">
+            or DownloadedTag = #{downloadedtag}
+        </if>
+        <if test="deletedtag != null and deletedtag != ''">
+            or DeletedTag = #{deletedtag}
+        </if>
+        <if test="creator != null and creator != ''">
+            or Creator = #{creator}
+        </if>
+        <if test="createdate != null">
+            or TO_CHAR(CreateDate,'yyyy-MM-dd') = '#{createdate}'
+        </if>
+        <if test="changer != null and changer != ''">
+            or Changer = #{changer}
+        </if>
+        <if test="changedate != null">
+            or TO_CHAR(ChangeDate,'yyyy-MM-dd') = '#{changedate}'
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.jisco.dynamicweight.pika.model.Centernet">
+        insert into jgshared."CenterNet"@PIKATEST ("Identity",
+                                                   "MeasureBill",
+                                                   "TrustBillNum",
+                                                   "VoucherIdentity",
+                                                   "VoucherItem",
+                                                   "BusinessGroup",
+                                                   "BusinessType",
+                                                   "StationType",
+                                                   "MeasureObjectType",
+                                                   "Conveyance",
+                                                   "Trailer",
+                                                   "TempConveyance",
+                                                   "ConveyanceGroup",
+                                                   "ConveyanceType",
+                                                   "ResourceSystem",
+                                                   "GroupPackageAmount",
+                                                   "GroupPackageUnit",
+                                                   "PackageAmount",
+                                                   "PackageUnit",
+                                                   "TheoryAmount",
+                                                   "Gross",
+                                                   "Tare",
+                                                   "PonderationAmount",
+                                                   "MeasureBatch",
+                                                   "MeasureBatchCount",
+                                                   "MeasureTaskNum",
+                                                   "SenderType",
+                                                   "SenderName",
+                                                   "Sender",
+                                                   "SenderRemark",
+                                                   "ReceiverType",
+                                                   "ReceiverName",
+                                                   "Receiver",
+                                                   "ReceiverRemark",
+                                                   "MaterialName",
+                                                   "Material",
+                                                   "TareSystem",
+                                                   "GrossSystem",
+                                                   "NetSystem",
+                                                   "TareDataResourceType",
+                                                   "GrossDataResourceType",
+                                                   "NetDataResourceType",
+                                                   "TareTime",
+                                                   "GrossTime",
+                                                   "NetTime",
+                                                   "TareStationName",
+                                                   "TareStation",
+                                                   "GrossStationName",
+                                                   "GrossStation",
+                                                   "NetStationName",
+                                                   "NetStation",
+                                                   "TareWeightor",
+                                                   "GrossWeightor",
+                                                   "NetWeightor",
+                                                   "BatchIdentity",
+                                                   "BusinessState",
+                                                   "BillType",
+                                                   "MeasureType",
+                                                   "AmountUnit",
+                                                   "DownloadedTag",
+                                                   "DeletedTag",
+                                                   "Creator",
+                                                   "CreateDate",
+                                                   "Changer",
+                                                   "ChangeDate")
+        values (#{identity,jdbcType=VARCHAR}, #{measurebill,jdbcType=VARCHAR}, #{trustbillnum,jdbcType=VARCHAR},
+                #{voucheridentity,jdbcType=VARCHAR}, #{voucheritem,jdbcType=VARCHAR}, #{businessgroup,jdbcType=VARCHAR},
+                #{businesstype,jdbcType=VARCHAR}, #{stationtype,jdbcType=VARCHAR},
+                #{measureobjecttype,jdbcType=VARCHAR},
+                #{conveyance,jdbcType=VARCHAR}, #{trailer,jdbcType=VARCHAR}, #{tempconveyance,jdbcType=VARCHAR},
+                #{conveyancegroup,jdbcType=VARCHAR}, #{conveyancetype,jdbcType=VARCHAR},
+                #{resourcesystem,jdbcType=VARCHAR},
+                #{grouppackageamount,jdbcType=DECIMAL}, #{grouppackageunit,jdbcType=VARCHAR},
+                #{packageamount,jdbcType=DECIMAL},
+                #{packageunit,jdbcType=VARCHAR}, #{theoryamount,jdbcType=DECIMAL}, #{gross,jdbcType=DECIMAL},
+                #{tare,jdbcType=DECIMAL}, #{ponderationamount,jdbcType=DECIMAL}, #{measurebatch,jdbcType=VARCHAR},
+                #{measurebatchcount,jdbcType=DECIMAL}, #{measuretasknum,jdbcType=VARCHAR},
+                #{sendertype,jdbcType=VARCHAR},
+                #{sendername,jdbcType=VARCHAR}, #{sender,jdbcType=VARCHAR}, #{senderremark,jdbcType=VARCHAR},
+                #{receivertype,jdbcType=VARCHAR}, #{receivername,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR},
+                #{receiverremark,jdbcType=VARCHAR}, #{materialname,jdbcType=VARCHAR}, #{material,jdbcType=VARCHAR},
+                #{taresystem,jdbcType=VARCHAR}, #{grosssystem,jdbcType=VARCHAR}, #{netsystem,jdbcType=VARCHAR},
+                #{taredataresourcetype,jdbcType=VARCHAR}, #{grossdataresourcetype,jdbcType=VARCHAR},
+                #{netdataresourcetype,jdbcType=VARCHAR}, #{taretime,jdbcType=TIMESTAMP},
+                #{grosstime,jdbcType=TIMESTAMP},
+                #{nettime,jdbcType=TIMESTAMP}, #{tarestationname,jdbcType=VARCHAR}, #{tarestation,jdbcType=VARCHAR},
+                #{grossstationname,jdbcType=VARCHAR}, #{grossstation,jdbcType=VARCHAR},
+                #{netstationname,jdbcType=VARCHAR},
+                #{netstation,jdbcType=VARCHAR}, #{tareweightor,jdbcType=VARCHAR}, #{grossweightor,jdbcType=VARCHAR},
+                #{netweightor,jdbcType=VARCHAR}, #{batchidentity,jdbcType=VARCHAR}, #{businessstate,jdbcType=VARCHAR},
+                #{billtype,jdbcType=VARCHAR}, #{measuretype,jdbcType=VARCHAR}, #{amountunit,jdbcType=VARCHAR},
+                #{downloadedtag,jdbcType=VARCHAR}, #{deletedtag,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
+                #{createdate,jdbcType=TIMESTAMP}, #{changer,jdbcType=VARCHAR}, #{changedate,jdbcType=TIMESTAMP})
+    </insert>
+    <insert id="insertSelective" parameterType="com.jisco.dynamicweight.pika.model.Centernet">
+        insert into jgshared."CenterNet"@PIKATEST
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="identity != null">
+                Identity,
+            </if>
+            <if test="measurebill != null">
+                MeasureBill,
+            </if>
+            <if test="trustbillnum != null">
+                TrustBillNum,
+            </if>
+            <if test="voucheridentity != null">
+                VoucherIdentity,
+            </if>
+            <if test="voucheritem != null">
+                VoucherItem,
+            </if>
+            <if test="businessgroup != null">
+                BusinessGroup,
+            </if>
+            <if test="businesstype != null">
+                BusinessType,
+            </if>
+            <if test="stationtype != null">
+                StationType,
+            </if>
+            <if test="measureobjecttype != null">
+                MeasureObjectType,
+            </if>
+            <if test="conveyance != null">
+                Conveyance,
+            </if>
+            <if test="trailer != null">
+                Trailer,
+            </if>
+            <if test="tempconveyance != null">
+                TempConveyance,
+            </if>
+            <if test="conveyancegroup != null">
+                ConveyanceGroup,
+            </if>
+            <if test="conveyancetype != null">
+                ConveyanceType,
+            </if>
+            <if test="resourcesystem != null">
+                ResourceSystem,
+            </if>
+            <if test="grouppackageamount != null">
+                GroupPackageAmount,
+            </if>
+            <if test="grouppackageunit != null">
+                GroupPackageUnit,
+            </if>
+            <if test="packageamount != null">
+                PackageAmount,
+            </if>
+            <if test="packageunit != null">
+                PackageUnit,
+            </if>
+            <if test="theoryamount != null">
+                TheoryAmount,
+            </if>
+            <if test="gross != null">
+                Gross,
+            </if>
+            <if test="tare != null">
+                Tare,
+            </if>
+            <if test="ponderationamount != null">
+                PonderationAmount,
+            </if>
+            <if test="measurebatch != null">
+                MeasureBatch,
+            </if>
+            <if test="measurebatchcount != null">
+                MeasureBatchCount,
+            </if>
+            <if test="measuretasknum != null">
+                MeasureTaskNum,
+            </if>
+            <if test="sendertype != null">
+                SenderType,
+            </if>
+            <if test="sendername != null">
+                SenderName,
+            </if>
+            <if test="sender != null">
+                Sender,
+            </if>
+            <if test="senderremark != null">
+                SenderRemark,
+            </if>
+            <if test="receivertype != null">
+                ReceiverType,
+            </if>
+            <if test="receivername != null">
+                ReceiverName,
+            </if>
+            <if test="receiver != null">
+                Receiver,
+            </if>
+            <if test="receiverremark != null">
+                ReceiverRemark,
+            </if>
+            <if test="materialname != null">
+                MaterialName,
+            </if>
+            <if test="material != null">
+                Material,
+            </if>
+            <if test="taresystem != null">
+                TareSystem,
+            </if>
+            <if test="grosssystem != null">
+                GrossSystem,
+            </if>
+            <if test="netsystem != null">
+                NetSystem,
+            </if>
+            <if test="taredataresourcetype != null">
+                TareDataResourceType,
+            </if>
+            <if test="grossdataresourcetype != null">
+                GrossDataResourceType,
+            </if>
+            <if test="netdataresourcetype != null">
+                NetDataResourceType,
+            </if>
+            <if test="taretime != null">
+                TareTime,
+            </if>
+            <if test="grosstime != null">
+                GrossTime,
+            </if>
+            <if test="nettime != null">
+                NetTime,
+            </if>
+            <if test="tarestationname != null">
+                TareStationName,
+            </if>
+            <if test="tarestation != null">
+                TareStation,
+            </if>
+            <if test="grossstationname != null">
+                GrossStationName,
+            </if>
+            <if test="grossstation != null">
+                GrossStation,
+            </if>
+            <if test="netstationname != null">
+                NetStationName,
+            </if>
+            <if test="netstation != null">
+                NetStation,
+            </if>
+            <if test="tareweightor != null">
+                TareWeightor,
+            </if>
+            <if test="grossweightor != null">
+                GrossWeightor,
+            </if>
+            <if test="netweightor != null">
+                NetWeightor,
+            </if>
+            <if test="batchidentity != null">
+                BatchIdentity,
+            </if>
+            <if test="businessstate != null">
+                BusinessState,
+            </if>
+            <if test="billtype != null">
+                BillType,
+            </if>
+            <if test="measuretype != null">
+                MeasureType,
+            </if>
+            <if test="amountunit != null">
+                AmountUnit,
+            </if>
+            <if test="downloadedtag != null">
+                DownloadedTag,
+            </if>
+            <if test="deletedtag != null">
+                DeletedTag,
+            </if>
+            <if test="creator != null">
+                Creator,
+            </if>
+            <if test="createdate != null">
+                CreateDate,
+            </if>
+            <if test="changer != null">
+                Changer,
+            </if>
+            <if test="changedate != null">
+                ChangeDate,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="identity != null">
+                #{identity,jdbcType=VARCHAR},
+            </if>
+            <if test="measurebill != null">
+                #{measurebill,jdbcType=VARCHAR},
+            </if>
+            <if test="trustbillnum != null">
+                #{trustbillnum,jdbcType=VARCHAR},
+            </if>
+            <if test="voucheridentity != null">
+                #{voucheridentity,jdbcType=VARCHAR},
+            </if>
+            <if test="voucheritem != null">
+                #{voucheritem,jdbcType=VARCHAR},
+            </if>
+            <if test="businessgroup != null">
+                #{businessgroup,jdbcType=VARCHAR},
+            </if>
+            <if test="businesstype != null">
+                #{businesstype,jdbcType=VARCHAR},
+            </if>
+            <if test="stationtype != null">
+                #{stationtype,jdbcType=VARCHAR},
+            </if>
+            <if test="measureobjecttype != null">
+                #{measureobjecttype,jdbcType=VARCHAR},
+            </if>
+            <if test="conveyance != null">
+                #{conveyance,jdbcType=VARCHAR},
+            </if>
+            <if test="trailer != null">
+                #{trailer,jdbcType=VARCHAR},
+            </if>
+            <if test="tempconveyance != null">
+                #{tempconveyance,jdbcType=VARCHAR},
+            </if>
+            <if test="conveyancegroup != null">
+                #{conveyancegroup,jdbcType=VARCHAR},
+            </if>
+            <if test="conveyancetype != null">
+                #{conveyancetype,jdbcType=VARCHAR},
+            </if>
+            <if test="resourcesystem != null">
+                #{resourcesystem,jdbcType=VARCHAR},
+            </if>
+            <if test="grouppackageamount != null">
+                #{grouppackageamount,jdbcType=DECIMAL},
+            </if>
+            <if test="grouppackageunit != null">
+                #{grouppackageunit,jdbcType=VARCHAR},
+            </if>
+            <if test="packageamount != null">
+                #{packageamount,jdbcType=DECIMAL},
+            </if>
+            <if test="packageunit != null">
+                #{packageunit,jdbcType=VARCHAR},
+            </if>
+            <if test="theoryamount != null">
+                #{theoryamount,jdbcType=DECIMAL},
+            </if>
+            <if test="gross != null">
+                #{gross,jdbcType=DECIMAL},
+            </if>
+            <if test="tare != null">
+                #{tare,jdbcType=DECIMAL},
+            </if>
+            <if test="ponderationamount != null">
+                #{ponderationamount,jdbcType=DECIMAL},
+            </if>
+            <if test="measurebatch != null">
+                #{measurebatch,jdbcType=VARCHAR},
+            </if>
+            <if test="measurebatchcount != null">
+                #{measurebatchcount,jdbcType=DECIMAL},
+            </if>
+            <if test="measuretasknum != null">
+                #{measuretasknum,jdbcType=VARCHAR},
+            </if>
+            <if test="sendertype != null">
+                #{sendertype,jdbcType=VARCHAR},
+            </if>
+            <if test="sendername != null">
+                #{sendername,jdbcType=VARCHAR},
+            </if>
+            <if test="sender != null">
+                #{sender,jdbcType=VARCHAR},
+            </if>
+            <if test="senderremark != null">
+                #{senderremark,jdbcType=VARCHAR},
+            </if>
+            <if test="receivertype != null">
+                #{receivertype,jdbcType=VARCHAR},
+            </if>
+            <if test="receivername != null">
+                #{receivername,jdbcType=VARCHAR},
+            </if>
+            <if test="receiver != null">
+                #{receiver,jdbcType=VARCHAR},
+            </if>
+            <if test="receiverremark != null">
+                #{receiverremark,jdbcType=VARCHAR},
+            </if>
+            <if test="materialname != null">
+                #{materialname,jdbcType=VARCHAR},
+            </if>
+            <if test="material != null">
+                #{material,jdbcType=VARCHAR},
+            </if>
+            <if test="taresystem != null">
+                #{taresystem,jdbcType=VARCHAR},
+            </if>
+            <if test="grosssystem != null">
+                #{grosssystem,jdbcType=VARCHAR},
+            </if>
+            <if test="netsystem != null">
+                #{netsystem,jdbcType=VARCHAR},
+            </if>
+            <if test="taredataresourcetype != null">
+                #{taredataresourcetype,jdbcType=VARCHAR},
+            </if>
+            <if test="grossdataresourcetype != null">
+                #{grossdataresourcetype,jdbcType=VARCHAR},
+            </if>
+            <if test="netdataresourcetype != null">
+                #{netdataresourcetype,jdbcType=VARCHAR},
+            </if>
+            <if test="taretime != null">
+                #{taretime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="grosstime != null">
+                #{grosstime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="nettime != null">
+                #{nettime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="tarestationname != null">
+                #{tarestationname,jdbcType=VARCHAR},
+            </if>
+            <if test="tarestation != null">
+                #{tarestation,jdbcType=VARCHAR},
+            </if>
+            <if test="grossstationname != null">
+                #{grossstationname,jdbcType=VARCHAR},
+            </if>
+            <if test="grossstation != null">
+                #{grossstation,jdbcType=VARCHAR},
+            </if>
+            <if test="netstationname != null">
+                #{netstationname,jdbcType=VARCHAR},
+            </if>
+            <if test="netstation != null">
+                #{netstation,jdbcType=VARCHAR},
+            </if>
+            <if test="tareweightor != null">
+                #{tareweightor,jdbcType=VARCHAR},
+            </if>
+            <if test="grossweightor != null">
+                #{grossweightor,jdbcType=VARCHAR},
+            </if>
+            <if test="netweightor != null">
+                #{netweightor,jdbcType=VARCHAR},
+            </if>
+            <if test="batchidentity != null">
+                #{batchidentity,jdbcType=VARCHAR},
+            </if>
+            <if test="businessstate != null">
+                #{businessstate,jdbcType=VARCHAR},
+            </if>
+            <if test="billtype != null">
+                #{billtype,jdbcType=VARCHAR},
+            </if>
+            <if test="measuretype != null">
+                #{measuretype,jdbcType=VARCHAR},
+            </if>
+            <if test="amountunit != null">
+                #{amountunit,jdbcType=VARCHAR},
+            </if>
+            <if test="downloadedtag != null">
+                #{downloadedtag,jdbcType=VARCHAR},
+            </if>
+            <if test="deletedtag != null">
+                #{deletedtag,jdbcType=VARCHAR},
+            </if>
+            <if test="creator != null">
+                #{creator,jdbcType=VARCHAR},
+            </if>
+            <if test="createdate != null">
+                #{createdate,jdbcType=TIMESTAMP},
+            </if>
+            <if test="changer != null">
+                #{changer,jdbcType=VARCHAR},
+            </if>
+            <if test="changedate != null">
+                #{changedate,jdbcType=TIMESTAMP},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKey" parameterType="com.jisco.dynamicweight.pika.model.Centernet">
+        update jgshared."CenterNet"@PIKATEST
+        set "MeasureBill"           = #{measurebill,jdbcType=VARCHAR},
+            "TrustBillNum"          = #{trustbillnum,jdbcType=VARCHAR},
+            "VoucherIdentity"       = #{voucheridentity,jdbcType=VARCHAR},
+            "VoucherItem"           = #{voucheritem,jdbcType=VARCHAR},
+            "BusinessGroup"         = #{businessgroup,jdbcType=VARCHAR},
+            "BusinessType"          = #{businesstype,jdbcType=VARCHAR},
+            "StationType"           = #{stationtype,jdbcType=VARCHAR},
+            "MeasureObjectType"     = #{measureobjecttype,jdbcType=VARCHAR},
+            "Conveyance"            = #{conveyance,jdbcType=VARCHAR},
+            "Trailer"               = #{trailer,jdbcType=VARCHAR},
+            "TempConveyance"        = #{tempconveyance,jdbcType=VARCHAR},
+            "ConveyanceGroup"       = #{conveyancegroup,jdbcType=VARCHAR},
+            "ConveyanceType"        = #{conveyancetype,jdbcType=VARCHAR},
+            "ResourceSystem"        = #{resourcesystem,jdbcType=VARCHAR},
+            "GroupPackageAmount"    = #{grouppackageamount,jdbcType=DECIMAL},
+            "GroupPackageUnit"      = #{grouppackageunit,jdbcType=VARCHAR},
+            "PackageAmount"         = #{packageamount,jdbcType=DECIMAL},
+            "PackageUnit"           = #{packageunit,jdbcType=VARCHAR},
+            "TheoryAmount"          = #{theoryamount,jdbcType=DECIMAL},
+            "Gross"                 = #{gross,jdbcType=DECIMAL},
+            "Tare"                  = #{tare,jdbcType=DECIMAL},
+            "PonderationAmount"     = #{ponderationamount,jdbcType=DECIMAL},
+            "MeasureBatch"          = #{measurebatch,jdbcType=VARCHAR},
+            "MeasureBatchCount"     = #{measurebatchcount,jdbcType=DECIMAL},
+            "MeasureTaskNum"        = #{measuretasknum,jdbcType=VARCHAR},
+            "SenderType"            = #{sendertype,jdbcType=VARCHAR},
+            "SenderName"            = #{sendername,jdbcType=VARCHAR},
+            "Sender"                = #{sender,jdbcType=VARCHAR},
+            "SenderRemark"          = #{senderremark,jdbcType=VARCHAR},
+            "ReceiverType"          = #{receivertype,jdbcType=VARCHAR},
+            "ReceiverName"          = #{receivername,jdbcType=VARCHAR},
+            "Receiver"              = #{receiver,jdbcType=VARCHAR},
+            "ReceiverRemark"        = #{receiverremark,jdbcType=VARCHAR},
+            "MaterialName"          = #{materialname,jdbcType=VARCHAR},
+            "Material"              = #{material,jdbcType=VARCHAR},
+            "TareSystem"            = #{taresystem,jdbcType=VARCHAR},
+            "GrossSystem"           = #{grosssystem,jdbcType=VARCHAR},
+            "NetSystem"             = #{netsystem,jdbcType=VARCHAR},
+            "TareDataResourceType"  = #{taredataresourcetype,jdbcType=VARCHAR},
+            "GrossDataResourceType" = #{grossdataresourcetype,jdbcType=VARCHAR},
+            "NetDataResourceType"   = #{netdataresourcetype,jdbcType=VARCHAR},
+            "TareTime"              = #{taretime,jdbcType=TIMESTAMP},
+            "GrossTime"             = #{grosstime,jdbcType=TIMESTAMP},
+            "NetTime"               = #{nettime,jdbcType=TIMESTAMP},
+            "TareStationName"       = #{tarestationname,jdbcType=VARCHAR},
+            "TareStation"           = #{tarestation,jdbcType=VARCHAR},
+            "GrossStationName"      = #{grossstationname,jdbcType=VARCHAR},
+            "GrossStation"          = #{grossstation,jdbcType=VARCHAR},
+            "NetStationName"        = #{netstationname,jdbcType=VARCHAR},
+            "NetStation"            = #{netstation,jdbcType=VARCHAR},
+            "TareWeightor"          = #{tareweightor,jdbcType=VARCHAR},
+            "GrossWeightor"         = #{grossweightor,jdbcType=VARCHAR},
+            "NetWeightor"           = #{netweightor,jdbcType=VARCHAR},
+            "BatchIdentity"         = #{batchidentity,jdbcType=VARCHAR},
+            "BusinessState"         = #{businessstate,jdbcType=VARCHAR},
+            "BillType"              = #{billtype,jdbcType=VARCHAR},
+            "MeasureType"           = #{measuretype,jdbcType=VARCHAR},
+            "AmountUnit"            = #{amountunit,jdbcType=VARCHAR},
+            "DownloadedTag"         = #{downloadedtag,jdbcType=VARCHAR},
+            "DeletedTag"            = #{deletedtag,jdbcType=VARCHAR},
+            "Creator"               = #{creator,jdbcType=VARCHAR},
+            "CreateDate"            = #{createdate,jdbcType=TIMESTAMP},
+            "Changer"               = #{changer,jdbcType=VARCHAR},
+            "ChangeDate"            = #{changedate,jdbcType=TIMESTAMP}
+        where "Identity" = #{identity,jdbcType=VARCHAR}
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.jisco.dynamicweight.pika.model.Centernet">
+        update jgshared."CenterNet"@PIKATEST
+        <set>
+            <if test="measurebill != null">
+                "MeasureBill" = #{measurebill,jdbcType=VARCHAR},
+            </if>
+            <if test="trustbillnum != null">
+                "TrustBillNum" = #{trustbillnum,jdbcType=VARCHAR},
+            </if>
+            <if test="voucheridentity != null">
+                "VoucherIdentity" = #{voucheridentity,jdbcType=VARCHAR},
+            </if>
+            <if test="voucheritem != null">
+                "VoucherItem" = #{voucheritem,jdbcType=VARCHAR},
+            </if>
+            <if test="businessgroup != null">
+                "BusinessGroup" = #{businessgroup,jdbcType=VARCHAR},
+            </if>
+            <if test="businesstype != null">
+                "BusinessType" = #{businesstype,jdbcType=VARCHAR},
+            </if>
+            <if test="stationtype != null">
+                "StationType" = #{stationtype,jdbcType=VARCHAR},
+            </if>
+            <if test="measureobjecttype != null">
+                "MeasureObjectType" = #{measureobjecttype,jdbcType=VARCHAR},
+            </if>
+            <if test="conveyance != null">
+                "Conveyance" = #{conveyance,jdbcType=VARCHAR},
+            </if>
+            <if test="trailer != null">
+                "Trailer" = #{trailer,jdbcType=VARCHAR},
+            </if>
+            <if test="tempconveyance != null">
+                "TempConveyance" = #{tempconveyance,jdbcType=VARCHAR},
+            </if>
+            <if test="conveyancegroup != null">
+                "ConveyanceGroup" = #{conveyancegroup,jdbcType=VARCHAR},
+            </if>
+            <if test="conveyancetype != null">
+                "ConveyanceType" = #{conveyancetype,jdbcType=VARCHAR},
+            </if>
+            <if test="resourcesystem != null">
+                "ResourceSystem" = #{resourcesystem,jdbcType=VARCHAR},
+            </if>
+            <if test="grouppackageamount != null">
+                "GroupPackageAmount" = #{grouppackageamount,jdbcType=DECIMAL},
+            </if>
+            <if test="grouppackageunit != null">
+                "GroupPackageUnit" = #{grouppackageunit,jdbcType=VARCHAR},
+            </if>
+            <if test="packageamount != null">
+                "PackageAmount" = #{packageamount,jdbcType=DECIMAL},
+            </if>
+            <if test="packageunit != null">
+                "PackageUnit" = #{packageunit,jdbcType=VARCHAR},
+            </if>
+            <if test="theoryamount != null">
+                "TheoryAmount" = #{theoryamount,jdbcType=DECIMAL},
+            </if>
+            <if test="gross != null">
+                "Gross" = #{gross,jdbcType=DECIMAL},
+            </if>
+            <if test="tare != null">
+                "Tare" = #{tare,jdbcType=DECIMAL},
+            </if>
+            <if test="ponderationamount != null">
+                "PonderationAmount" = #{ponderationamount,jdbcType=DECIMAL},
+            </if>
+            <if test="measurebatch != null">
+                "MeasureBatch" = #{measurebatch,jdbcType=VARCHAR},
+            </if>
+            <if test="measurebatchcount != null">
+                "MeasureBatchCount" = #{measurebatchcount,jdbcType=DECIMAL},
+            </if>
+            <if test="measuretasknum != null">
+                "MeasureTaskNum" = #{measuretasknum,jdbcType=VARCHAR},
+            </if>
+            <if test="sendertype != null">
+                "SenderType" = #{sendertype,jdbcType=VARCHAR},
+            </if>
+            <if test="sendername != null">
+                "SenderName" = #{sendername,jdbcType=VARCHAR},
+            </if>
+            <if test="sender != null">
+                "Sender" = #{sender,jdbcType=VARCHAR},
+            </if>
+            <if test="senderremark != null">
+                "SenderRemark" = #{senderremark,jdbcType=VARCHAR},
+            </if>
+            <if test="receivertype != null">
+                "ReceiverType" = #{receivertype,jdbcType=VARCHAR},
+            </if>
+            <if test="receivername != null">
+                "ReceiverName" = #{receivername,jdbcType=VARCHAR},
+            </if>
+            <if test="receiver != null">
+                "Receiver" = #{receiver,jdbcType=VARCHAR},
+            </if>
+            <if test="receiverremark != null">
+                "ReceiverRemark" = #{receiverremark,jdbcType=VARCHAR},
+            </if>
+            <if test="materialname != null">
+                "MaterialName" = #{materialname,jdbcType=VARCHAR},
+            </if>
+            <if test="material != null">
+                "Material" = #{material,jdbcType=VARCHAR},
+            </if>
+            <if test="taresystem != null">
+                "TareSystem" = #{taresystem,jdbcType=VARCHAR},
+            </if>
+            <if test="grosssystem != null">
+                "GrossSystem" = #{grosssystem,jdbcType=VARCHAR},
+            </if>
+            <if test="netsystem != null">
+                "NetSystem" = #{netsystem,jdbcType=VARCHAR},
+            </if>
+            <if test="taredataresourcetype != null">
+                "TareDataResourceType" = #{taredataresourcetype,jdbcType=VARCHAR},
+            </if>
+            <if test="grossdataresourcetype != null">
+                "GrossDataResourceType" = #{grossdataresourcetype,jdbcType=VARCHAR},
+            </if>
+            <if test="netdataresourcetype != null">
+                "NetDataResourceType" = #{netdataresourcetype,jdbcType=VARCHAR},
+            </if>
+            <if test="taretime != null">
+                "TareTime" = #{taretime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="grosstime != null">
+                "GrossTime" = #{grosstime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="nettime != null">
+                "NetTime" = #{nettime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="tarestationname != null">
+                "TareStationName" = #{tarestationname,jdbcType=VARCHAR},
+            </if>
+            <if test="tarestation != null">
+                "TareStation" = #{tarestation,jdbcType=VARCHAR},
+            </if>
+            <if test="grossstationname != null">
+                "GrossStationName" = #{grossstationname,jdbcType=VARCHAR},
+            </if>
+            <if test="grossstation != null">
+                "GrossStation" = #{grossstation,jdbcType=VARCHAR},
+            </if>
+            <if test="netstationname != null">
+                "NetStationName" = #{netstationname,jdbcType=VARCHAR},
+            </if>
+            <if test="netstation != null">
+                "NetStation" = #{netstation,jdbcType=VARCHAR},
+            </if>
+            <if test="tareweightor != null">
+                "TareWeightor" = #{tareweightor,jdbcType=VARCHAR},
+            </if>
+            <if test="grossweightor != null">
+                "GrossWeightor" = #{grossweightor,jdbcType=VARCHAR},
+            </if>
+            <if test="netweightor != null">
+                "NetWeightor" = #{netweightor,jdbcType=VARCHAR},
+            </if>
+            <if test="batchidentity != null">
+                "BatchIdentity" = #{batchidentity,jdbcType=VARCHAR},
+            </if>
+            <if test="businessstate != null">
+                "BusinessState" = #{businessstate,jdbcType=VARCHAR},
+            </if>
+            <if test="billtype != null">
+                "BillType" = #{billtype,jdbcType=VARCHAR},
+            </if>
+            <if test="measuretype != null">
+                "MeasureType" = #{measuretype,jdbcType=VARCHAR},
+            </if>
+            <if test="amountunit != null">
+                "AmountUnit" = #{amountunit,jdbcType=VARCHAR},
+            </if>
+            <if test="downloadedtag != null">
+                "DownloadedTag" = #{downloadedtag,jdbcType=VARCHAR},
+            </if>
+            <if test="deletedtag != null">
+                "DeletedTag" = #{deletedtag,jdbcType=VARCHAR},
+            </if>
+            <if test="creator != null">
+                "Creator" = #{creator,jdbcType=VARCHAR},
+            </if>
+            <if test="createdate != null">
+                "CreateDate" = #{createdate,jdbcType=TIMESTAMP},
+            </if>
+            <if test="changer != null">
+                "Changer" = #{changer,jdbcType=VARCHAR},
+            </if>
+            <if test="changedate != null">
+                "ChangeDate" = #{changedate,jdbcType=TIMESTAMP},
+            </if>
+        </set>
+        where "Identity" = #{identity,jdbcType=VARCHAR}
+    </update>
+    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+        <include refid="select"/>
+        where "Identity" = #{identity,jdbcType=VARCHAR}
+    </select>
+    <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+        <include refid="select"/>
+        <include refid="where"/>
+    </select>
+    <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+        <include refid="select"/>
+        <include refid="whereLike"/>
+    </select>
+    <insert id="batchInsert" parameterType="java.util.List">
+        insert into jgshared."CenterNet"@PIKATEST
+        ("Identity",
+        "MeasureBill",
+        "TrustBillNum",
+        "VoucherIdentity",
+        "VoucherItem",
+        "BusinessGroup",
+        "BusinessType",
+        "StationType",
+        "MeasureObjectType",
+        "Conveyance",
+        "Trailer",
+        "TempConveyance",
+        "ConveyanceGroup",
+        "ConveyanceType",
+        "ResourceSystem",
+        "GroupPackageAmount",
+        "GroupPackageUnit",
+        "PackageAmount",
+        "PackageUnit",
+        "TheoryAmount",
+        "Gross",
+        "Tare",
+        "PonderationAmount",
+        "MeasureBatch",
+        "MeasureBatchCount",
+        "MeasureTaskNum",
+        "SenderType",
+        "SenderName",
+        "Sender",
+        "SenderRemark",
+        "ReceiverType",
+        "ReceiverName",
+        "Receiver",
+        "ReceiverRemark",
+        "MaterialName",
+        "Material",
+        "TareSystem",
+        "GrossSystem",
+        "NetSystem",
+        "TareDataResourceType",
+        "GrossDataResourceType",
+        "NetDataResourceType",
+        "TareTime",
+        "GrossTime",
+        "NetTime",
+        "TareStationName",
+        "TareStation",
+        "GrossStationName",
+        "GrossStation",
+        "NetStationName",
+        "NetStation",
+        "TareWeightor",
+        "GrossWeightor",
+        "NetWeightor",
+        "BatchIdentity",
+        "BusinessState",
+        "BillType",
+        "MeasureType",
+        "AmountUnit",
+        "DownloadedTag",
+        "DeletedTag",
+        "Creator",
+        "CreateDate",
+        "Changer",
+        "ChangeDate")
+        (
+        <foreach collection="list" item="item" separator="union all">
+            select
+            <choose>
+                <when test="item.identity != null">
+                    #{item.identity,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.measurebill != null">
+                    #{item.measurebill,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.trustbillnum != null">
+                    #{item.trustbillnum,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.voucheridentity != null">
+                    #{item.voucheridentity,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.voucheritem != null">
+                    #{item.voucheritem,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.businessgroup != null">
+                    #{item.businessgroup,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.businesstype != null">
+                    #{item.businesstype,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.stationtype != null">
+                    #{item.stationtype,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.measureobjecttype != null">
+                    #{item.measureobjecttype,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.conveyance != null">
+                    #{item.conveyance,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.trailer != null">
+                    #{item.trailer,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.tempconveyance != null">
+                    #{item.tempconveyance,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.conveyancegroup != null">
+                    #{item.conveyancegroup,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.conveyancetype != null">
+                    #{item.conveyancetype,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.resourcesystem != null">
+                    #{item.resourcesystem,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.grouppackageamount != null">
+                    #{item.grouppackageamount,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.grouppackageunit != null">
+                    #{item.grouppackageunit,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.packageamount != null">
+                    #{item.packageamount,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.packageunit != null">
+                    #{item.packageunit,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.theoryamount != null">
+                    #{item.theoryamount,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.gross != null">
+                    #{item.gross,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.tare != null">
+                    #{item.tare,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.ponderationamount != null">
+                    #{item.ponderationamount,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.measurebatch != null">
+                    #{item.measurebatch,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.measurebatchcount != null">
+                    #{item.measurebatchcount,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.measuretasknum != null">
+                    #{item.measuretasknum,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.sendertype != null">
+                    #{item.sendertype,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.sendername != null">
+                    #{item.sendername,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.sender != null">
+                    #{item.sender,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.senderremark != null">
+                    #{item.senderremark,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.receivertype != null">
+                    #{item.receivertype,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.receivername != null">
+                    #{item.receivername,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.receiver != null">
+                    #{item.receiver,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.receiverremark != null">
+                    #{item.receiverremark,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.materialname != null">
+                    #{item.materialname,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.material != null">
+                    #{item.material,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.taresystem != null">
+                    #{item.taresystem,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.grosssystem != null">
+                    #{item.grosssystem,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.netsystem != null">
+                    #{item.netsystem,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.taredataresourcetype != null">
+                    #{item.taredataresourcetype,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.grossdataresourcetype != null">
+                    #{item.grossdataresourcetype,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.netdataresourcetype != null">
+                    #{item.netdataresourcetype,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.taretime != null">
+                    #{item.taretime,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.grosstime != null">
+                    #{item.grosstime,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.nettime != null">
+                    #{item.nettime,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.tarestationname != null">
+                    #{item.tarestationname,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.tarestation != null">
+                    #{item.tarestation,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.grossstationname != null">
+                    #{item.grossstationname,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.grossstation != null">
+                    #{item.grossstation,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.netstationname != null">
+                    #{item.netstationname,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.netstation != null">
+                    #{item.netstation,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.tareweightor != null">
+                    #{item.tareweightor,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.grossweightor != null">
+                    #{item.grossweightor,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.netweightor != null">
+                    #{item.netweightor,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.batchidentity != null">
+                    #{item.batchidentity,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.businessstate != null">
+                    #{item.businessstate,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.billtype != null">
+                    #{item.billtype,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.measuretype != null">
+                    #{item.measuretype,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.amountunit != null">
+                    #{item.amountunit,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.downloadedtag != null">
+                    #{item.downloadedtag,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.deletedtag != null">
+                    #{item.deletedtag,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.creator != null">
+                    #{item.creator,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.createdate != null">
+                    #{item.createdate,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.changer != null">
+                    #{item.changer,jdbcType=VARCHAR},
+                </when>
+                <otherwise>
+                    null,
+                </otherwise>
+            </choose>
+
+            <choose>
+                <when test="item.changedate != null">
+                    #{item.changedate,jdbcType=VARCHAR}
+                </when>
+                <otherwise>
+                    null
+                </otherwise>
+            </choose>
+            from dual
+        </foreach>
+        )
+    </insert>
+    <update id="batchUpdate" parameterType="java.util.List">
+        update jgshared."CenterNet"@PIKATEST
+        set
+        "Identity"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.identity,jdbcType=VARCHAR}
+        </foreach>
+        ,"MeasureBill"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.measurebill,jdbcType=VARCHAR}
+        </foreach>
+        ,"TrustBillNum"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.trustbillnum,jdbcType=VARCHAR}
+        </foreach>
+        ,"VoucherIdentity"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.voucheridentity,jdbcType=VARCHAR}
+        </foreach>
+        ,"VoucherItem"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.voucheritem,jdbcType=VARCHAR}
+        </foreach>
+        ,"BusinessGroup"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.businessgroup,jdbcType=VARCHAR}
+        </foreach>
+        ,"BusinessType"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.businesstype,jdbcType=VARCHAR}
+        </foreach>
+        ,"StationType"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.stationtype,jdbcType=VARCHAR}
+        </foreach>
+        ,"MeasureObjectType"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.measureobjecttype,jdbcType=VARCHAR}
+        </foreach>
+        ,"Conveyance"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.conveyance,jdbcType=VARCHAR}
+        </foreach>
+        ,"Trailer"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.trailer,jdbcType=VARCHAR}
+        </foreach>
+        ,"TempConveyance"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.tempconveyance,jdbcType=VARCHAR}
+        </foreach>
+        ,"ConveyanceGroup"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.conveyancegroup,jdbcType=VARCHAR}
+        </foreach>
+        ,"ConveyanceType"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.conveyancetype,jdbcType=VARCHAR}
+        </foreach>
+        ,"ResourceSystem"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.resourcesystem,jdbcType=VARCHAR}
+        </foreach>
+        ,"GroupPackageAmount"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.grouppackageamount,jdbcType=DECIMAL}
+        </foreach>
+        ,"GroupPackageUnit"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.grouppackageunit,jdbcType=VARCHAR}
+        </foreach>
+        ,"PackageAmount"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.packageamount,jdbcType=DECIMAL}
+        </foreach>
+        ,"PackageUnit"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.packageunit,jdbcType=VARCHAR}
+        </foreach>
+        ,"TheoryAmount"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.theoryamount,jdbcType=DECIMAL}
+        </foreach>
+        ,"Gross"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.gross,jdbcType=DECIMAL}
+        </foreach>
+        ,"Tare"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.tare,jdbcType=DECIMAL}
+        </foreach>
+        ,"PonderationAmount"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.ponderationamount,jdbcType=DECIMAL}
+        </foreach>
+        ,"MeasureBatch"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.measurebatch,jdbcType=VARCHAR}
+        </foreach>
+        ,"MeasureBatchCount"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.measurebatchcount,jdbcType=DECIMAL}
+        </foreach>
+        ,"MeasureTaskNum"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.measuretasknum,jdbcType=VARCHAR}
+        </foreach>
+        ,"SenderType"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.sendertype,jdbcType=VARCHAR}
+        </foreach>
+        ,"SenderName"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.sendername,jdbcType=VARCHAR}
+        </foreach>
+        ,"Sender"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.sender,jdbcType=VARCHAR}
+        </foreach>
+        ,"SenderRemark"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.senderremark,jdbcType=VARCHAR}
+        </foreach>
+        ,"ReceiverType"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.receivertype,jdbcType=VARCHAR}
+        </foreach>
+        ,"ReceiverName"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.receivername,jdbcType=VARCHAR}
+        </foreach>
+        ,"Receiver"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.receiver,jdbcType=VARCHAR}
+        </foreach>
+        ,"ReceiverRemark"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.receiverremark,jdbcType=VARCHAR}
+        </foreach>
+        ,"MaterialName"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.materialname,jdbcType=VARCHAR}
+        </foreach>
+        ,"Material"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.material,jdbcType=VARCHAR}
+        </foreach>
+        ,"TareSystem"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.taresystem,jdbcType=VARCHAR}
+        </foreach>
+        ,"GrossSystem"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.grosssystem,jdbcType=VARCHAR}
+        </foreach>
+        ,"NetSystem"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.netsystem,jdbcType=VARCHAR}
+        </foreach>
+        ,"TareDataResourceType"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.taredataresourcetype,jdbcType=VARCHAR}
+        </foreach>
+        ,"GrossDataResourceType"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.grossdataresourcetype,jdbcType=VARCHAR}
+        </foreach>
+        ,"NetDataResourceType"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.netdataresourcetype,jdbcType=VARCHAR}
+        </foreach>
+        ,"TareTime"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.taretime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,"GrossTime"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.grosstime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,"NetTime"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.nettime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,"TareStationName"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.tarestationname,jdbcType=VARCHAR}
+        </foreach>
+        ,"TareStation"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.tarestation,jdbcType=VARCHAR}
+        </foreach>
+        ,"GrossStationName"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.grossstationname,jdbcType=VARCHAR}
+        </foreach>
+        ,"GrossStation"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.grossstation,jdbcType=VARCHAR}
+        </foreach>
+        ,"NetStationName"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.netstationname,jdbcType=VARCHAR}
+        </foreach>
+        ,"NetStation"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.netstation,jdbcType=VARCHAR}
+        </foreach>
+        ,"TareWeightor"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.tareweightor,jdbcType=VARCHAR}
+        </foreach>
+        ,"GrossWeightor"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.grossweightor,jdbcType=VARCHAR}
+        </foreach>
+        ,"NetWeightor"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.netweightor,jdbcType=VARCHAR}
+        </foreach>
+        ,"BatchIdentity"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.batchidentity,jdbcType=VARCHAR}
+        </foreach>
+        ,"BusinessState"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.businessstate,jdbcType=VARCHAR}
+        </foreach>
+        ,"BillType"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.billtype,jdbcType=VARCHAR}
+        </foreach>
+        ,"MeasureType"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.measuretype,jdbcType=VARCHAR}
+        </foreach>
+        ,"AmountUnit"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.amountunit,jdbcType=VARCHAR}
+        </foreach>
+        ,"DownloadedTag"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.downloadedtag,jdbcType=VARCHAR}
+        </foreach>
+        ,"DeletedTag"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.deletedtag,jdbcType=VARCHAR}
+        </foreach>
+        ,"Creator"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.creator,jdbcType=VARCHAR}
+        </foreach>
+        ,"CreateDate"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.createdate,jdbcType=TIMESTAMP}
+        </foreach>
+        ,"Changer"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.changer,jdbcType=VARCHAR}
+        </foreach>
+        ,"ChangeDate"=
+        <foreach collection="list" item="item" index="index" separator=" " open="case Identity" close="end">
+            when #{item.identity,jdbcType=VARCHAR} then #{item.changedate,jdbcType=TIMESTAMP}
+        </foreach>
+        where "Identity" in
+        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+            #{item.identity,jdbcType=VARCHAR}
+        </foreach>
+    </update>
+    <delete id="batchDelete" parameterType="java.util.List">
+        delete from jgshared."CenterNet"@PIKATEST
+        where "Identity" in
+        <foreach collection="list" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+    </delete>
+    <!-- 友情提示!!!-->
+    <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+</mapper>

+ 1009 - 0
src/main/java/com/jisco/dynamicweight/pika/model/Centernet.java

@@ -0,0 +1,1009 @@
+package com.jisco.dynamicweight.pika.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="null")
+public class Centernet implements IBasePO<String> {
+    /**
+     * ?????(Identity,VARCHAR,30)
+     */
+    @ApiModelProperty(value="?????",required=true)
+    private String identity;
+
+    /**
+     * ????(MeasureBill,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String measurebill;
+
+    /**
+     * ????(TrustBillNum,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String trustbillnum;
+
+    /**
+     * ????(VoucherIdentity,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String voucheridentity;
+
+    /**
+     * ????(VoucherItem,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String voucheritem;
+
+    /**
+     * ??????(BusinessGroup,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=false)
+    private String businessgroup;
+
+    /**
+     * ????(BusinessType,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String businesstype;
+
+    /**
+     * ????(StationType,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String stationtype;
+
+    /**
+     * ??????(MeasureObjectType,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=true)
+    private String measureobjecttype;
+
+    /**
+     * ????(Conveyance,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String conveyance;
+
+    /**
+     * ???(Trailer,VARCHAR,30)
+     */
+    @ApiModelProperty(value="???",required=false)
+    private String trailer;
+
+    /**
+     * ????(TempConveyance,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String tempconveyance;
+
+    /**
+     * ?????(ConveyanceGroup,VARCHAR,30)
+     */
+    @ApiModelProperty(value="?????",required=true)
+    private String conveyancegroup;
+
+    /**
+     * ??????(ConveyanceType,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=false)
+    private String conveyancetype;
+
+    /**
+     * ?????(ResourceSystem,VARCHAR,30)
+     */
+    @ApiModelProperty(value="?????",required=true)
+    private String resourcesystem;
+
+    /**
+     * ?????(GroupPackageAmount,DECIMAL,10)
+     */
+    @ApiModelProperty(value="?????",required=false)
+    private Long grouppackageamount;
+
+    /**
+     * ??????(GroupPackageUnit,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=false)
+    private String grouppackageunit;
+
+    /**
+     * ????(PackageAmount,DECIMAL,10)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private Long packageamount;
+
+    /**
+     * ????(PackageUnit,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String packageunit;
+
+    /**
+     * ???(TheoryAmount,DECIMAL,16)
+     */
+    @ApiModelProperty(value="???",required=false)
+    private BigDecimal theoryamount;
+
+    /**
+     * ??(Gross,DECIMAL,16)
+     */
+    @ApiModelProperty(value="??",required=true)
+    private BigDecimal gross;
+
+    /**
+     * ??(Tare,DECIMAL,16)
+     */
+    @ApiModelProperty(value="??",required=false)
+    private BigDecimal tare;
+
+    /**
+     * ??(PonderationAmount,DECIMAL,16)
+     */
+    @ApiModelProperty(value="??",required=true)
+    private BigDecimal ponderationamount;
+
+    /**
+     * ?????(MeasureBatch,VARCHAR,30)
+     */
+    @ApiModelProperty(value="?????",required=false)
+    private String measurebatch;
+
+    /**
+     * ??????(MeasureBatchCount,DECIMAL,10)
+     */
+    @ApiModelProperty(value="??????",required=false)
+    private Long measurebatchcount;
+
+    /**
+     * ?????(MeasureTaskNum,VARCHAR,30)
+     */
+    @ApiModelProperty(value="?????",required=false)
+    private String measuretasknum;
+
+    /**
+     * ?????(SenderType,VARCHAR,30)
+     */
+    @ApiModelProperty(value="?????",required=false)
+    private String sendertype;
+
+    /**
+     * ????(SenderName,VARCHAR,100)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String sendername;
+
+    /**
+     * ??????(Sender,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=false)
+    private String sender;
+
+    /**
+     * ?????(SenderRemark,VARCHAR,100)
+     */
+    @ApiModelProperty(value="?????",required=false)
+    private String senderremark;
+
+    /**
+     * ?????(ReceiverType,VARCHAR,30)
+     */
+    @ApiModelProperty(value="?????",required=false)
+    private String receivertype;
+
+    /**
+     * ????(ReceiverName,VARCHAR,100)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String receivername;
+
+    /**
+     * ??????(Receiver,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=false)
+    private String receiver;
+
+    /**
+     * ?????(ReceiverRemark,VARCHAR,100)
+     */
+    @ApiModelProperty(value="?????",required=false)
+    private String receiverremark;
+
+    /**
+     * ????(MaterialName,VARCHAR,100)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String materialname;
+
+    /**
+     * ????(Material,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String material;
+
+    /**
+     * ????(TareSystem,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String taresystem;
+
+    /**
+     * ????(GrossSystem,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String grosssystem;
+
+    /**
+     * ????(NetSystem,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String netsystem;
+
+    /**
+     * ??????(TareDataResourceType,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=true)
+    private String taredataresourcetype;
+
+    /**
+     * ??????(GrossDataResourceType,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=true)
+    private String grossdataresourcetype;
+
+    /**
+     * ??????(NetDataResourceType,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=true)
+    private String netdataresourcetype;
+
+    /**
+     * ????(TareTime,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private Date taretime;
+
+    /**
+     * ????(GrossTime,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private Date grosstime;
+
+    /**
+     * ????(NetTime,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private Date nettime;
+
+    /**
+     * ????(TareStationName,VARCHAR,100)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String tarestationname;
+
+    /**
+     * ??????(TareStation,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=true)
+    private String tarestation;
+
+    /**
+     * ????(GrossStationName,VARCHAR,100)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String grossstationname;
+
+    /**
+     * ??????(GrossStation,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=true)
+    private String grossstation;
+
+    /**
+     * ????(NetStationName,VARCHAR,100)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String netstationname;
+
+    /**
+     * ??????(NetStation,VARCHAR,30)
+     */
+    @ApiModelProperty(value="??????",required=true)
+    private String netstation;
+
+    /**
+     * ?????(TareWeightor,VARCHAR,30)
+     */
+    @ApiModelProperty(value="?????",required=true)
+    private String tareweightor;
+
+    /**
+     * ?????(GrossWeightor,VARCHAR,30)
+     */
+    @ApiModelProperty(value="?????",required=true)
+    private String grossweightor;
+
+    /**
+     * ?????(NetWeightor,VARCHAR,30)
+     */
+    @ApiModelProperty(value="?????",required=true)
+    private String netweightor;
+
+    /**
+     * ????(BatchIdentity,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String batchidentity;
+
+    /**
+     * ????(BusinessState,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String businessstate;
+
+    /**
+     * ????(BillType,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String billtype;
+
+    /**
+     * ????(MeasureType,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String measuretype;
+
+    /**
+     * ????(AmountUnit,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private String amountunit;
+
+    /**
+     * ?????(DownloadedTag,VARCHAR,30)
+     */
+    @ApiModelProperty(value="?????",required=false)
+    private String downloadedtag;
+
+    /**
+     * ????(DeletedTag,VARCHAR,30)
+     */
+    @ApiModelProperty(value="????",required=false)
+    private String deletedtag;
+
+    /**
+     * ???(Creator,VARCHAR,30)
+     */
+    @ApiModelProperty(value="???",required=true)
+    private String creator;
+
+    /**
+     * ????(CreateDate,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private Date createdate;
+
+    /**
+     * ???(Changer,VARCHAR,30)
+     */
+    @ApiModelProperty(value="???",required=true)
+    private String changer;
+
+    /**
+     * ????(ChangeDate,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="????",required=true)
+    private Date changedate;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.identity;
+    }
+
+    @Override
+    public void setId(String identity) {
+        this.identity = identity == null ? null : identity.trim();
+    }
+
+    public String getIdentity() {
+        return identity;
+    }
+
+    public void setIdentity(String identity) {
+        this.identity = identity == null ? null : identity.trim();
+    }
+
+    public String getMeasurebill() {
+        return measurebill;
+    }
+
+    public void setMeasurebill(String measurebill) {
+        this.measurebill = measurebill == null ? null : measurebill.trim();
+    }
+
+    public String getTrustbillnum() {
+        return trustbillnum;
+    }
+
+    public void setTrustbillnum(String trustbillnum) {
+        this.trustbillnum = trustbillnum == null ? null : trustbillnum.trim();
+    }
+
+    public String getVoucheridentity() {
+        return voucheridentity;
+    }
+
+    public void setVoucheridentity(String voucheridentity) {
+        this.voucheridentity = voucheridentity == null ? null : voucheridentity.trim();
+    }
+
+    public String getVoucheritem() {
+        return voucheritem;
+    }
+
+    public void setVoucheritem(String voucheritem) {
+        this.voucheritem = voucheritem == null ? null : voucheritem.trim();
+    }
+
+    public String getBusinessgroup() {
+        return businessgroup;
+    }
+
+    public void setBusinessgroup(String businessgroup) {
+        this.businessgroup = businessgroup == null ? null : businessgroup.trim();
+    }
+
+    public String getBusinesstype() {
+        return businesstype;
+    }
+
+    public void setBusinesstype(String businesstype) {
+        this.businesstype = businesstype == null ? null : businesstype.trim();
+    }
+
+    public String getStationtype() {
+        return stationtype;
+    }
+
+    public void setStationtype(String stationtype) {
+        this.stationtype = stationtype == null ? null : stationtype.trim();
+    }
+
+    public String getMeasureobjecttype() {
+        return measureobjecttype;
+    }
+
+    public void setMeasureobjecttype(String measureobjecttype) {
+        this.measureobjecttype = measureobjecttype == null ? null : measureobjecttype.trim();
+    }
+
+    public String getConveyance() {
+        return conveyance;
+    }
+
+    public void setConveyance(String conveyance) {
+        this.conveyance = conveyance == null ? null : conveyance.trim();
+    }
+
+    public String getTrailer() {
+        return trailer;
+    }
+
+    public void setTrailer(String trailer) {
+        this.trailer = trailer == null ? null : trailer.trim();
+    }
+
+    public String getTempconveyance() {
+        return tempconveyance;
+    }
+
+    public void setTempconveyance(String tempconveyance) {
+        this.tempconveyance = tempconveyance == null ? null : tempconveyance.trim();
+    }
+
+    public String getConveyancegroup() {
+        return conveyancegroup;
+    }
+
+    public void setConveyancegroup(String conveyancegroup) {
+        this.conveyancegroup = conveyancegroup == null ? null : conveyancegroup.trim();
+    }
+
+    public String getConveyancetype() {
+        return conveyancetype;
+    }
+
+    public void setConveyancetype(String conveyancetype) {
+        this.conveyancetype = conveyancetype == null ? null : conveyancetype.trim();
+    }
+
+    public String getResourcesystem() {
+        return resourcesystem;
+    }
+
+    public void setResourcesystem(String resourcesystem) {
+        this.resourcesystem = resourcesystem == null ? null : resourcesystem.trim();
+    }
+
+    public Long getGrouppackageamount() {
+        return grouppackageamount;
+    }
+
+    public void setGrouppackageamount(Long grouppackageamount) {
+        this.grouppackageamount = grouppackageamount;
+    }
+
+    public String getGrouppackageunit() {
+        return grouppackageunit;
+    }
+
+    public void setGrouppackageunit(String grouppackageunit) {
+        this.grouppackageunit = grouppackageunit == null ? null : grouppackageunit.trim();
+    }
+
+    public Long getPackageamount() {
+        return packageamount;
+    }
+
+    public void setPackageamount(Long packageamount) {
+        this.packageamount = packageamount;
+    }
+
+    public String getPackageunit() {
+        return packageunit;
+    }
+
+    public void setPackageunit(String packageunit) {
+        this.packageunit = packageunit == null ? null : packageunit.trim();
+    }
+
+    public BigDecimal getTheoryamount() {
+        return theoryamount;
+    }
+
+    public void setTheoryamount(BigDecimal theoryamount) {
+        this.theoryamount = theoryamount;
+    }
+
+    public BigDecimal getGross() {
+        return gross;
+    }
+
+    public void setGross(BigDecimal gross) {
+        this.gross = gross;
+    }
+
+    public BigDecimal getTare() {
+        return tare;
+    }
+
+    public void setTare(BigDecimal tare) {
+        this.tare = tare;
+    }
+
+    public BigDecimal getPonderationamount() {
+        return ponderationamount;
+    }
+
+    public void setPonderationamount(BigDecimal ponderationamount) {
+        this.ponderationamount = ponderationamount;
+    }
+
+    public String getMeasurebatch() {
+        return measurebatch;
+    }
+
+    public void setMeasurebatch(String measurebatch) {
+        this.measurebatch = measurebatch == null ? null : measurebatch.trim();
+    }
+
+    public Long getMeasurebatchcount() {
+        return measurebatchcount;
+    }
+
+    public void setMeasurebatchcount(Long measurebatchcount) {
+        this.measurebatchcount = measurebatchcount;
+    }
+
+    public String getMeasuretasknum() {
+        return measuretasknum;
+    }
+
+    public void setMeasuretasknum(String measuretasknum) {
+        this.measuretasknum = measuretasknum == null ? null : measuretasknum.trim();
+    }
+
+    public String getSendertype() {
+        return sendertype;
+    }
+
+    public void setSendertype(String sendertype) {
+        this.sendertype = sendertype == null ? null : sendertype.trim();
+    }
+
+    public String getSendername() {
+        return sendername;
+    }
+
+    public void setSendername(String sendername) {
+        this.sendername = sendername == null ? null : sendername.trim();
+    }
+
+    public String getSender() {
+        return sender;
+    }
+
+    public void setSender(String sender) {
+        this.sender = sender == null ? null : sender.trim();
+    }
+
+    public String getSenderremark() {
+        return senderremark;
+    }
+
+    public void setSenderremark(String senderremark) {
+        this.senderremark = senderremark == null ? null : senderremark.trim();
+    }
+
+    public String getReceivertype() {
+        return receivertype;
+    }
+
+    public void setReceivertype(String receivertype) {
+        this.receivertype = receivertype == null ? null : receivertype.trim();
+    }
+
+    public String getReceivername() {
+        return receivername;
+    }
+
+    public void setReceivername(String receivername) {
+        this.receivername = receivername == null ? null : receivername.trim();
+    }
+
+    public String getReceiver() {
+        return receiver;
+    }
+
+    public void setReceiver(String receiver) {
+        this.receiver = receiver == null ? null : receiver.trim();
+    }
+
+    public String getReceiverremark() {
+        return receiverremark;
+    }
+
+    public void setReceiverremark(String receiverremark) {
+        this.receiverremark = receiverremark == null ? null : receiverremark.trim();
+    }
+
+    public String getMaterialname() {
+        return materialname;
+    }
+
+    public void setMaterialname(String materialname) {
+        this.materialname = materialname == null ? null : materialname.trim();
+    }
+
+    public String getMaterial() {
+        return material;
+    }
+
+    public void setMaterial(String material) {
+        this.material = material == null ? null : material.trim();
+    }
+
+    public String getTaresystem() {
+        return taresystem;
+    }
+
+    public void setTaresystem(String taresystem) {
+        this.taresystem = taresystem == null ? null : taresystem.trim();
+    }
+
+    public String getGrosssystem() {
+        return grosssystem;
+    }
+
+    public void setGrosssystem(String grosssystem) {
+        this.grosssystem = grosssystem == null ? null : grosssystem.trim();
+    }
+
+    public String getNetsystem() {
+        return netsystem;
+    }
+
+    public void setNetsystem(String netsystem) {
+        this.netsystem = netsystem == null ? null : netsystem.trim();
+    }
+
+    public String getTaredataresourcetype() {
+        return taredataresourcetype;
+    }
+
+    public void setTaredataresourcetype(String taredataresourcetype) {
+        this.taredataresourcetype = taredataresourcetype == null ? null : taredataresourcetype.trim();
+    }
+
+    public String getGrossdataresourcetype() {
+        return grossdataresourcetype;
+    }
+
+    public void setGrossdataresourcetype(String grossdataresourcetype) {
+        this.grossdataresourcetype = grossdataresourcetype == null ? null : grossdataresourcetype.trim();
+    }
+
+    public String getNetdataresourcetype() {
+        return netdataresourcetype;
+    }
+
+    public void setNetdataresourcetype(String netdataresourcetype) {
+        this.netdataresourcetype = netdataresourcetype == null ? null : netdataresourcetype.trim();
+    }
+
+    public Date getTaretime() {
+        return taretime;
+    }
+
+    public void setTaretime(Date taretime) {
+        this.taretime = taretime;
+    }
+
+    public Date getGrosstime() {
+        return grosstime;
+    }
+
+    public void setGrosstime(Date grosstime) {
+        this.grosstime = grosstime;
+    }
+
+    public Date getNettime() {
+        return nettime;
+    }
+
+    public void setNettime(Date nettime) {
+        this.nettime = nettime;
+    }
+
+    public String getTarestationname() {
+        return tarestationname;
+    }
+
+    public void setTarestationname(String tarestationname) {
+        this.tarestationname = tarestationname == null ? null : tarestationname.trim();
+    }
+
+    public String getTarestation() {
+        return tarestation;
+    }
+
+    public void setTarestation(String tarestation) {
+        this.tarestation = tarestation == null ? null : tarestation.trim();
+    }
+
+    public String getGrossstationname() {
+        return grossstationname;
+    }
+
+    public void setGrossstationname(String grossstationname) {
+        this.grossstationname = grossstationname == null ? null : grossstationname.trim();
+    }
+
+    public String getGrossstation() {
+        return grossstation;
+    }
+
+    public void setGrossstation(String grossstation) {
+        this.grossstation = grossstation == null ? null : grossstation.trim();
+    }
+
+    public String getNetstationname() {
+        return netstationname;
+    }
+
+    public void setNetstationname(String netstationname) {
+        this.netstationname = netstationname == null ? null : netstationname.trim();
+    }
+
+    public String getNetstation() {
+        return netstation;
+    }
+
+    public void setNetstation(String netstation) {
+        this.netstation = netstation == null ? null : netstation.trim();
+    }
+
+    public String getTareweightor() {
+        return tareweightor;
+    }
+
+    public void setTareweightor(String tareweightor) {
+        this.tareweightor = tareweightor == null ? null : tareweightor.trim();
+    }
+
+    public String getGrossweightor() {
+        return grossweightor;
+    }
+
+    public void setGrossweightor(String grossweightor) {
+        this.grossweightor = grossweightor == null ? null : grossweightor.trim();
+    }
+
+    public String getNetweightor() {
+        return netweightor;
+    }
+
+    public void setNetweightor(String netweightor) {
+        this.netweightor = netweightor == null ? null : netweightor.trim();
+    }
+
+    public String getBatchidentity() {
+        return batchidentity;
+    }
+
+    public void setBatchidentity(String batchidentity) {
+        this.batchidentity = batchidentity == null ? null : batchidentity.trim();
+    }
+
+    public String getBusinessstate() {
+        return businessstate;
+    }
+
+    public void setBusinessstate(String businessstate) {
+        this.businessstate = businessstate == null ? null : businessstate.trim();
+    }
+
+    public String getBilltype() {
+        return billtype;
+    }
+
+    public void setBilltype(String billtype) {
+        this.billtype = billtype == null ? null : billtype.trim();
+    }
+
+    public String getMeasuretype() {
+        return measuretype;
+    }
+
+    public void setMeasuretype(String measuretype) {
+        this.measuretype = measuretype == null ? null : measuretype.trim();
+    }
+
+    public String getAmountunit() {
+        return amountunit;
+    }
+
+    public void setAmountunit(String amountunit) {
+        this.amountunit = amountunit == null ? null : amountunit.trim();
+    }
+
+    public String getDownloadedtag() {
+        return downloadedtag;
+    }
+
+    public void setDownloadedtag(String downloadedtag) {
+        this.downloadedtag = downloadedtag == null ? null : downloadedtag.trim();
+    }
+
+    public String getDeletedtag() {
+        return deletedtag;
+    }
+
+    public void setDeletedtag(String deletedtag) {
+        this.deletedtag = deletedtag == null ? null : deletedtag.trim();
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator == null ? null : creator.trim();
+    }
+
+    public Date getCreatedate() {
+        return createdate;
+    }
+
+    public void setCreatedate(Date createdate) {
+        this.createdate = createdate;
+    }
+
+    public String getChanger() {
+        return changer;
+    }
+
+    public void setChanger(String changer) {
+        this.changer = changer == null ? null : changer.trim();
+    }
+
+    public Date getChangedate() {
+        return changedate;
+    }
+
+    public void setChangedate(Date changedate) {
+        this.changedate = changedate;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", identity=").append(identity);
+        sb.append(", measurebill=").append(measurebill);
+        sb.append(", trustbillnum=").append(trustbillnum);
+        sb.append(", voucheridentity=").append(voucheridentity);
+        sb.append(", voucheritem=").append(voucheritem);
+        sb.append(", businessgroup=").append(businessgroup);
+        sb.append(", businesstype=").append(businesstype);
+        sb.append(", stationtype=").append(stationtype);
+        sb.append(", measureobjecttype=").append(measureobjecttype);
+        sb.append(", conveyance=").append(conveyance);
+        sb.append(", trailer=").append(trailer);
+        sb.append(", tempconveyance=").append(tempconveyance);
+        sb.append(", conveyancegroup=").append(conveyancegroup);
+        sb.append(", conveyancetype=").append(conveyancetype);
+        sb.append(", resourcesystem=").append(resourcesystem);
+        sb.append(", grouppackageamount=").append(grouppackageamount);
+        sb.append(", grouppackageunit=").append(grouppackageunit);
+        sb.append(", packageamount=").append(packageamount);
+        sb.append(", packageunit=").append(packageunit);
+        sb.append(", theoryamount=").append(theoryamount);
+        sb.append(", gross=").append(gross);
+        sb.append(", tare=").append(tare);
+        sb.append(", ponderationamount=").append(ponderationamount);
+        sb.append(", measurebatch=").append(measurebatch);
+        sb.append(", measurebatchcount=").append(measurebatchcount);
+        sb.append(", measuretasknum=").append(measuretasknum);
+        sb.append(", sendertype=").append(sendertype);
+        sb.append(", sendername=").append(sendername);
+        sb.append(", sender=").append(sender);
+        sb.append(", senderremark=").append(senderremark);
+        sb.append(", receivertype=").append(receivertype);
+        sb.append(", receivername=").append(receivername);
+        sb.append(", receiver=").append(receiver);
+        sb.append(", receiverremark=").append(receiverremark);
+        sb.append(", materialname=").append(materialname);
+        sb.append(", material=").append(material);
+        sb.append(", taresystem=").append(taresystem);
+        sb.append(", grosssystem=").append(grosssystem);
+        sb.append(", netsystem=").append(netsystem);
+        sb.append(", taredataresourcetype=").append(taredataresourcetype);
+        sb.append(", grossdataresourcetype=").append(grossdataresourcetype);
+        sb.append(", netdataresourcetype=").append(netdataresourcetype);
+        sb.append(", taretime=").append(taretime);
+        sb.append(", grosstime=").append(grosstime);
+        sb.append(", nettime=").append(nettime);
+        sb.append(", tarestationname=").append(tarestationname);
+        sb.append(", tarestation=").append(tarestation);
+        sb.append(", grossstationname=").append(grossstationname);
+        sb.append(", grossstation=").append(grossstation);
+        sb.append(", netstationname=").append(netstationname);
+        sb.append(", netstation=").append(netstation);
+        sb.append(", tareweightor=").append(tareweightor);
+        sb.append(", grossweightor=").append(grossweightor);
+        sb.append(", netweightor=").append(netweightor);
+        sb.append(", batchidentity=").append(batchidentity);
+        sb.append(", businessstate=").append(businessstate);
+        sb.append(", billtype=").append(billtype);
+        sb.append(", measuretype=").append(measuretype);
+        sb.append(", amountunit=").append(amountunit);
+        sb.append(", downloadedtag=").append(downloadedtag);
+        sb.append(", deletedtag=").append(deletedtag);
+        sb.append(", creator=").append(creator);
+        sb.append(", createdate=").append(createdate);
+        sb.append(", changer=").append(changer);
+        sb.append(", changedate=").append(changedate);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 27 - 0
src/main/java/com/jisco/dynamicweight/pika/service/ICenternetService.java

@@ -0,0 +1,27 @@
+package com.jisco.dynamicweight.pika.service;
+
+import com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata;
+import com.jisco.dynamicweight.pika.model.Centernet;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.util.List;
+
+/**
+ * Centernet服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-02-11 11:33
+ * 类描述
+ * 修订历史:
+ * 日期:2022-02-11
+ * 作者:generator
+ * 参考:
+ * 描述:Centernet服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ICenternetService extends IBaseService<Centernet, String>{
+
+    void upload(List<DynamicWorkAuditdata> list);
+
+    void cancelUpload(List<DynamicWorkAuditdata> list);
+}

+ 136 - 0
src/main/java/com/jisco/dynamicweight/pika/service/impl/CenternetServiceImpl.java

@@ -0,0 +1,136 @@
+package com.jisco.dynamicweight.pika.service.impl;
+
+import com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata;
+import com.jisco.dynamicweight.pika.mapper.CenternetMapper;
+import com.jisco.dynamicweight.pika.model.Centernet;
+import com.jisco.dynamicweight.pika.service.ICenternetService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Centernet服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-02-11 11:33
+ * 类描述
+ * 修订历史:
+ * 日期:2022-02-11
+ * 作者:generator
+ * 参考:
+ * 描述:Centernet服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "centernetService")
+public class CenternetServiceImpl extends BaseServiceImpl<Centernet, String> implements ICenternetService {
+
+    @Autowired
+    private CenternetMapper centernetMapper;
+
+    @Override
+    protected IBaseMapper<Centernet, String> getMapper() {
+        return centernetMapper;
+    }
+
+    @Override
+    public void upload(List<DynamicWorkAuditdata> list) {
+        List<Centernet> centernets = new ArrayList<>();
+        list.forEach(item -> {
+            Centernet centernet = new Centernet();
+            centernet.setIdentity(item.getPikaDataId());
+            centernet.setMeasurebill(null);
+            centernet.setTrustbillnum(null);
+            centernet.setVoucheridentity(null);
+            centernet.setVoucheritem(null);
+            centernet.setBusinessgroup(null);
+            centernet.setBusinesstype("集中计量");
+            centernet.setStationtype("BeltScale");
+            centernet.setMeasureobjecttype("MaterialMeasure");
+            centernet.setConveyance(item.getStationCode());
+            centernet.setTrailer(null);
+            centernet.setTempconveyance(null);
+            centernet.setConveyancegroup("Belt");
+            centernet.setConveyancetype(null);
+            centernet.setResourcesystem("Mcms");
+            centernet.setGrouppackageamount(null);
+            centernet.setGrouppackageunit(null);
+            centernet.setPackageamount(null);
+            centernet.setPackageunit(null);
+            centernet.setTheoryamount(null);
+            centernet.setGross(item.getWeight());
+            centernet.setTare(BigDecimal.ZERO);
+            centernet.setPonderationamount(item.getWeight());
+            centernet.setMeasurebatch(null);
+            centernet.setMeasurebatchcount(null);
+            centernet.setMeasuretasknum(null);
+            switch (item.getSenderType()){
+                case "部门":centernet.setSendertype("Department");break;
+                case "库存地": centernet.setSendertype("Storeroom");break;
+                case "企业(公司)":centernet.setSendertype("Enterprise");break;
+                default:centernet.setSendertype("");;
+            }
+            centernet.setSendername(item.getSenderName());
+            centernet.setSender(item.getSenderCode());
+            centernet.setSenderremark(null);
+            switch (item.getRecieverType()){
+                case "部门":centernet.setReceivertype("Department");break;
+                case "库存地": centernet.setReceivertype("Storeroom");break;
+                case "企业(公司)":centernet.setReceivertype("Enterprise");break;
+                default:centernet.setReceivertype("");;
+            }
+            centernet.setReceivername(item.getRecieverName());
+            centernet.setReceiver(item.getRecieverCode());
+            centernet.setReceiverremark(null);
+            centernet.setMaterialname(item.getMaterialName());
+            centernet.setMaterial(item.getMaterialCode());
+            centernet.setTaresystem("Mcms");
+            centernet.setGrosssystem("Mcms");
+            centernet.setNetsystem("Mcms");
+            centernet.setTaredataresourcetype("WeightingInstrumentCollect");
+            centernet.setGrossdataresourcetype("FixMeasureValue");
+            centernet.setNetdataresourcetype("WeightingInstrumentCollect");
+            centernet.setTaretime(item.getEndTime());
+            centernet.setGrosstime(item.getEndTime());
+            centernet.setNettime(item.getEndTime());
+            centernet.setTarestationname(item.getStationName());
+            centernet.setTarestation(item.getStationCode());
+            centernet.setGrossstationname(item.getStationName());
+            centernet.setGrossstation(item.getStationCode());
+            centernet.setNetstationname(item.getStationName());
+            centernet.setNetstation(item.getStationCode());
+            centernet.setTareweightor(item.getAuditingManName());
+            centernet.setGrossweightor(item.getAuditingManName());
+            centernet.setNetweightor(item.getAuditingManName());
+            centernet.setBatchidentity(null);
+            centernet.setBusinessstate("NetAlready");
+            centernet.setBilltype("BeltBill");
+            centernet.setMeasuretype("MeasureMode6");
+            centernet.setAmountunit("Z40");
+            centernet.setDownloadedtag("N");
+            centernet.setDeletedtag("N");
+            centernet.setCreator("Mcms");
+            centernet.setCreatedate(new Date());
+            centernet.setChanger("Mcms");
+            centernet.setChangedate(new Date());
+            centernets.add(centernet);
+        });
+        this.batchAdd(centernets);
+    }
+
+    @Override
+    public void cancelUpload(List<DynamicWorkAuditdata> list) {
+        List<Centernet> centernets = new ArrayList<>();
+        for (DynamicWorkAuditdata auditdata : list) {
+            Centernet centernet = this.getById(auditdata.getPikaDataId());
+            centernet.setDeletedtag("Y");
+            centernets.add(centernet);
+        }
+        this.batchUpdate(centernets);
+    }
+}

+ 27 - 0
src/main/java/com/jisco/dynamicweight/util/VideoUtil.java

@@ -0,0 +1,27 @@
+package com.jisco.dynamicweight.util;
+
+import com.jisco.dynamicweight.dynamicbasecamera.model.DynamicBaseCamera;
+
+/**
+ * Created by Hzj on 2021/5/25.
+ */
+public class VideoUtil {
+
+    public static String getRTSPUrl(DynamicBaseCamera camera) {
+        String url = "";
+        if (camera.getManufacturer().indexOf("海康") >= 0) {//海康
+            url = "rtsp://" + camera.getUsername() + ":" + camera.getPassword() + "@" + camera.getCameraIp() + ":" + camera.getRstpPort() + "/Streaming/Channels/" + camera.getCameraChannel() + "0" + camera.getVedioType() + "?transportmode=unicast";
+        } else if (camera.getManufacturer().indexOf("大华") >= 0) {//大华
+            url = "rtsp://" + camera.getUsername() + ":" + camera.getPassword() + "@" + camera.getCameraIp() + ":" + camera.getRstpPort() + "/cam/realmonitor?channel=" + camera.getCameraChannel() + "&subtype=" + (camera.getVedioType() - 1) + "";
+        } else {
+            throw new RuntimeException("不支持的设备厂家");
+        }
+        return url;
+    }
+
+    //回放地址
+    public static String getRTSPPlayBackUrl(DynamicBaseCamera camera) {
+        String url = "rtsp://" + camera.getUsername() + ":" + camera.getPassword() + "@" + camera.getCameraIp() + ":" + camera.getRstpPort() + "/Streaming/tracks/" + camera.getCameraChannel() + "0" + camera.getVedioType() + "";
+        return url;
+    }
+}

+ 3 - 3
src/main/java/com/steerinfo/baseinfo/meterbasecar/model/MeterBaseCar.java

@@ -60,7 +60,7 @@ public class MeterBaseCar implements IBasePO<String> {
      * 车辆自重(CAR_SELF_WEIGHT,DECIMAL,10)
      */
     @ApiModelProperty(value="车辆自重",required=false)
-    private Long carSelfWeight;
+    private BigDecimal carSelfWeight;
 
     /**
      * 备注(MEMO,VARCHAR,200)
@@ -210,11 +210,11 @@ public class MeterBaseCar implements IBasePO<String> {
         this.carCarrierWeight = carCarrierWeight;
     }
 
-    public Long getCarSelfWeight() {
+    public BigDecimal getCarSelfWeight() {
         return carSelfWeight;
     }
 
-    public void setCarSelfWeight(Long carSelfWeight) {
+    public void setCarSelfWeight(BigDecimal carSelfWeight) {
         this.carSelfWeight = carSelfWeight;
     }
 

+ 7 - 0
src/main/java/com/steerinfo/baseinfo/meterbasedriver/service/IMeterBaseDriverService.java

@@ -3,6 +3,8 @@ package com.steerinfo.baseinfo.meterbasedriver.service;
 import com.steerinfo.baseinfo.meterbasecussupcar.model.MeterBaseCusSupCar;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.baseinfo.meterbasedriver.model.MeterBaseDriver;
+import feign.Param;
+
 import java.util.Date;
 import java.math.BigDecimal;
 import java.util.List;
@@ -28,4 +30,9 @@ public interface IMeterBaseDriverService extends IBaseService<MeterBaseDriver, S
     String abolish(List<MeterBaseDriver> models);
 
     String checkandupdate(String id,MeterBaseDriver model);
+//    批量删除
+    int deleteByBatch(String[] array);
+
+    void deleteDriverById(@Param("list") List<String> driverNos);
+
 }

+ 10 - 0
src/main/java/com/steerinfo/baseinfo/meterbasedriver/service/impl/MeterBaseDriverServiceImpl.java

@@ -123,6 +123,16 @@ public class MeterBaseDriverServiceImpl extends BaseServiceImpl<MeterBaseDriver,
         return "";
     }
 
+    @Override
+    public int deleteByBatch(String[] array) {
+        return 0;
+    }
+
+    @Override
+    public void deleteDriverById(List<String> driverNos) {
+        meterBaseDriverMapper.deleteDriverById(driverNos);
+    }
+
     private String check(MeterBaseDriver model)
     {
         if (model == null){

+ 283 - 27
src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/controller/MeterWorkHookActFirstController.java

@@ -4,14 +4,17 @@ import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.meterwork.dto.MeterWorkRailwayActFirstDto;
+import com.steerinfo.meterwork.except.MarkerMetException;
 import com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst;
 import com.steerinfo.meterwork.meterworkhookactfirst.service.IMeterWorkHookActFirstService;
+import com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
@@ -40,71 +43,324 @@ public class MeterWorkHookActFirstController extends BaseRESTfulController {
     @Autowired
     IMeterWorkHookActFirstService meterWorkHookActFirstService;
 
-    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiOperation(value = "获取列表", notes = "分页查询")
     @ApiImplicitParams({
-        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
-        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
     })
     //@RequiresPermissions("meterworkhookactfirst:view")
     @GetMapping(value = "/")
-    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+    public RESTfulResult list(@RequestParam HashMap parmas, Integer pageNum, Integer pageSize) {
         PageList<MeterWorkHookActFirst> list = meterWorkHookActFirstService.queryForPage(parmas, pageNum, pageSize);
         return success(list);
     }
 
-    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiOperation(value = "获取列表", notes = "分页模糊查询")
     @ApiImplicitParams({
-        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
-        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
     })
     //@RequiresPermissions("meterworkhookactfirst:view")
     @GetMapping(value = "/like/")
-    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+    public RESTfulResult listLike(@RequestParam HashMap parmas, Integer pageNum, Integer pageSize) {
         PageList<MeterWorkHookActFirst> list = meterWorkHookActFirstService.queryLikeForPage(parmas, pageNum, pageSize);
         return success(list);
     }
-    
-    @ApiOperation(value="创建", notes="根据MeterWorkHookActFirst对象创建")
+
+    @ApiOperation(value = "获取列表", notes = "分页模糊查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterworkhookactfirst:view")
+    @PostMapping(value = "/like/")
+    public RESTfulResult listLikePost(@RequestParam HashMap parmas, Integer pageNum, Integer pageSize) {
+        try {
+            PageList<MeterWorkHookActFirst> list = meterWorkHookActFirstService.queryLikeForPage(parmas, pageNum, pageSize);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
+    @ApiOperation(value = "创建", notes = "根据MeterWorkHookActFirst对象创建")
     @ApiImplicitParam(name = "meterWorkHookActFirst", value = "详细实体meterWorkHookActFirst", required = true, dataType = "MeterWorkHookActFirst")
     //@RequiresPermissions("meterworkhookactfirst:create")
     @PostMapping(value = "/")
-    public RESTfulResult add(@ModelAttribute MeterWorkHookActFirst model){
+    public RESTfulResult add(@ModelAttribute MeterWorkHookActFirst model) {
         MeterWorkHookActFirst meterWorkHookActFirst = meterWorkHookActFirstService.add(model);
         return success(meterWorkHookActFirst);
     }
 
-    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiOperation(value = "获取详细信息", notes = "根据url的id来获取详细信息")
     @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
     //@RequiresPermissions("meterworkhookactfirst:view")
     @GetMapping(value = "/{id}")
-    public RESTfulResult get(@PathVariable String id){
+    public RESTfulResult get(@PathVariable String id) {
         MeterWorkHookActFirst meterWorkHookActFirst = meterWorkHookActFirstService.getById(id);
         return success(meterWorkHookActFirst);
     }
 
-    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的meterWorkHookActFirst信息来更新详细信息")
+    @ApiOperation(value = "更新详细信息", notes = "根据url的id来指定更新对象,并根据传过来的meterWorkHookActFirst信息来更新详细信息")
     @ApiImplicitParams({
-        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
-        @ApiImplicitParam(name = "meterWorkHookActFirst", value = "详细实体meterWorkHookActFirst", required = true, dataType = "MeterWorkHookActFirst")
+            @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "meterWorkHookActFirst", value = "详细实体meterWorkHookActFirst", required = true, dataType = "MeterWorkHookActFirst")
     })
     //@RequiresPermissions("meterworkhookactfirst:update")
-    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
-    public RESTfulResult update(@PathVariable String id, @RequestBody MeterWorkHookActFirst model){
+    @PutMapping(value = "/{id}", produces = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody MeterWorkHookActFirst model) {
         model.setId(id);
         MeterWorkHookActFirst meterWorkHookActFirst = meterWorkHookActFirstService.modify(model);
         return success(meterWorkHookActFirst);
     }
 
-    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiOperation(value = "删除", notes = "根据url的id来指定删除对象")
     @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
     //@RequiresPermissions("meterworkhookactfirst:delete")
     @DeleteMapping(value = "/{id}")//String
-    public RESTfulResult delete(@PathVariable String id){
-    	List<String> list = Arrays.asList(id.split(","));
-    	if(ListUtils.isNotEmpty(list)) {
-	    	List<String> ids = ListUtils.convertList(list);
-			  meterWorkHookActFirstService.delete(ids);
-    	}
-      return success();
+    public RESTfulResult delete(@PathVariable String id) {
+        List<String> list = Arrays.asList(id.split(","));
+        if (ListUtils.isNotEmpty(list)) {
+            List<String> ids = ListUtils.convertList(list);
+            meterWorkHookActFirstService.delete(ids);
+        }
+        return success();
+    }
+
+    @ApiOperation(value = "火车号汇总统计汇总-网页", notes = "根据传入时间和火车号,查询给定时间段去重车号")
+    @GetMapping(value = "/distinctCarNo")
+    public RESTfulResult distinctCarNo(String railwayNo, String startTime, String endTime) {
+        RESTfulResult rm = failed();
+        try {
+            List<String> rows = meterWorkHookActFirstService.distinctCarNo(railwayNo, startTime, endTime);
+            return success(rows);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "新增数据", notes = "根据MeterWorkHookActFirst对象创建")
+    @ApiImplicitParam(name = "MeterWorkHookActFirst", value = "详细实体MeterWorkHookActFirst", required = true, dataType = "MeterWorkHookActFirst")
+    @PostMapping(value = "/add")
+    public RESTfulResult chechandadd(@RequestBody MeterWorkHookActFirst model) {
+        RESTfulResult rm = failed();
+        try {
+            int num = meterWorkHookActFirstService.checkandadd(model);
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("新增失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "修改数据", notes = "根据MeterWorkHookActFirst对象创建")
+    @PostMapping(value = "/update")
+    public RESTfulResult chechandupdate(@RequestBody MeterWorkHookActFirst model) {
+        RESTfulResult rm = failed();
+        try {
+            int num = meterWorkHookActFirstService.checkandupdate(model);
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("修改失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "数据审核", notes = "根据MeterWorkHookActFirst对象创建")
+    @PostMapping(value = "/audit")
+    public RESTfulResult audit(@RequestBody MeterWorkHookActFirst model) {
+        RESTfulResult rm = failed();
+        try {
+            int num = meterWorkHookActFirstService.audit(model);
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("审核失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
     }
+
+    @ApiOperation(value = "数据反审", notes = "根据MeterWorkHookActFirst对象创建")
+    @PostMapping(value = "/unaudit")
+    public RESTfulResult unaudit(@RequestBody MeterWorkHookActFirst model) {
+        RESTfulResult rm = failed();
+        try {
+            int num = meterWorkHookActFirstService.unaudit(model);
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("反审失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "修改车号-网页", notes = "根据MeterWorkHookActFirst对象修改车号")
+    @PostMapping(value = "/updateRailwayNo")
+    public RESTfulResult updateRailwayNo(@RequestBody MeterWorkHookActFirst model) {
+        RESTfulResult rm = failed();
+        try {
+            int num = meterWorkHookActFirstService.updateRailwayNo(model);
+            return success(num);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "停用-网页", notes = "根据MeterWorkHookActFirst对象修改状态")
+    @PostMapping(value = "/abolish")
+    public RESTfulResult abolish(@RequestBody List<MeterWorkHookActFirst> models) {
+        RESTfulResult rm = failed();
+        try {
+            int num = 0;
+            for(MeterWorkHookActFirst model:models){
+                if (!StringUtils.isEmpty(model.getActualFirstNo())){
+                    num += meterWorkHookActFirstService.abolish(model);
+                }
+            }
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("停用失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "启用-网页", notes = "根据MeterWorkHookActFirst对象创建")
+    @PostMapping(value = "/recover")
+    public RESTfulResult recover(@RequestBody List<MeterWorkHookActFirst> models) {
+        RESTfulResult rm = failed();
+        try {
+            int num = 0;
+            for(MeterWorkHookActFirst model:models){
+                if (!StringUtils.isEmpty(model.getActualFirstNo())){
+                    num += meterWorkHookActFirstService.recover(model);
+                }
+            }
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("启用失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "匹配委托-网页", notes = "根据MeterWorkHookActFirst对象创建")
+    @PostMapping(value = "/match")
+    public RESTfulResult match(@RequestBody MeterWorkHookActFirst model) {
+        RESTfulResult rm = failed();
+        try {
+            MeterWorkHookActFirst mwraf = meterWorkHookActFirstService.match(model.getActualFirstNo(), model.getPredictionNo());
+            if (mwraf != null) {
+                return success(mwraf);
+            } else {
+                return failed("匹配失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "解除委托-网页", notes = "根据MeterWorkHookActFirst对象创建")
+    @PostMapping(value = "/remove")
+    public RESTfulResult remove(@RequestBody List<MeterWorkHookActFirst> models) {
+        RESTfulResult rm = failed();
+        try {
+            int num = 0;
+            for(MeterWorkHookActFirst model:models){
+                if (!StringUtils.isEmpty(model.getActualFirstNo())){
+                    num += meterWorkHookActFirstService.remove(model);
+                }
+            }
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("解除失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        }
+        return rm;
+    }
+
+
 }

+ 14 - 0
src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/mapper/MeterWorkHookActFirstMapper.java

@@ -3,8 +3,22 @@ package com.steerinfo.meterwork.meterworkhookactfirst.mapper;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst;
 import java.math.*;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+import com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst;
 import org.apache.ibatis.annotations.Mapper;
 
 @Mapper
 public interface MeterWorkHookActFirstMapper extends IBaseMapper<MeterWorkHookActFirst, String> {
+    String getNewID(String format);
+
+    List<MeterWorkRailwayActFirst> selectView(HashMap parmas);
+
+    MeterWorkHookActFirst selectAndRemove(String actualFirstNo);
+
+    MeterWorkHookActFirst selectAndMatch(String actualFirstNo, String predictionNo);
+
+    List<MeterWorkHookActFirst> distinctCarNo(HashMap<String, Object> obj);
 }

+ 43 - 1
src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/mapper/MeterWorkHookActFirstMapper.xml

@@ -1865,5 +1865,47 @@
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  
+  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
+    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(ACTUAL_FIRST_NO, LENGTH(ACTUAL_FIRST_NO) - 3))),0) + 1,4,'0') ACTUAL_FIRST_NO
+    FROM METER_WORK_HOOK_ACT_FIRST where instr(ACTUAL_FIRST_NO,#{afl,jdbcType=VARCHAR})>0
+  </select>
+
+  <select id="selectAndRemove" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select  ACTUAL_FIRST_NO,  RAILWAY_NO, RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO,
+    RAILWAY_SPEED, RAILWAY_MODEL_NO,RAILWAY_MODEL_NAME, BIND_CARD_NO,  METER_PROCESS_NO, METER_PROCESS_EDITION_NO, METER_WEIGHT,
+    WEIGHT_TYPE, METER_SORT_WEIGHT, METER_BALANCE_WEIGHT, CREATE_MAN_NO, CREATE_MAN_NAME,
+    CREATE_TIME, BASE_SPOT_NO, BASE_SPOT_NAME, METER_CLASS, METER_GROUP, MEMO, VALUE_FLAG,
+    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, CHECK_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME,
+    CHECK_TIME, METER_MODE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME,METER_TYPE_NO,METER_TYPE_NAME
+    from METER_WORK_HOOK_ACT_FIRST
+    where ACTUAL_FIRST_NO= #{actualFirstNo,jdbcType=VARCHAR}
+  </select>
+
+  <select id="selectAndMatch" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select t.ACTUAL_FIRST_NO, t1.PREDICTION_NO, t1.NOTICE_NO, t.RAILWAY_NO, t1.RAILWAY_CARRIAGE_NO,
+    t.RAILWAY_WORK_NO, t.RAILWAY_SPEED, t.RAILWAY_MODEL_NO,t.RAILWAY_MODEL_NAME, t1.MATTER_NO, t1.MATTER_NAME,
+    t1.CONTRACT_NO, t1.BATCH_NO, t1.CUSTOMER_SUPPLIER_NO, t1.CUSTOMER_SUPPLIER_NAME, t1.FORWARDING_UNIT_NO,
+    t1.FORWARDING_UNIT_NAME, t1.RECEIVING_UINT_NO, t1.RECEIVING_UINT_NAME, t1.MATERIAL_NO,
+    t1.MATERIAL_NAME, t1.SPEC_NO, t1.SPEC_NAME, t1.SHIPMENT_GROSS_WEIGHT, t1.SHIPMENT_NET_WEIGHT,
+    t1.SHIPMENT_NUM, t.BIND_CARD_NO, t1.LOAD_POINT_NO, t1.LOAD_POINT_NAME, t1.SAMPLE_NO,
+    t1.SAMPLE_VOUCHER, t1.CARRIER_UNIT_NO, t1.CARRIER_UNIT_NAME, t1.PREDICTION_TYPE, t1.PREDICTION_COMBINATION,
+    t1.METER_TYPE_NO, t1.METER_TYPE_NAME, t.METER_PROCESS_NO, t.METER_PROCESS_EDITION_NO,
+    t.METER_WEIGHT, t.WEIGHT_TYPE, t.METER_SORT_WEIGHT, t.METER_BALANCE_WEIGHT, t.CREATE_MAN_NO,
+    t.CREATE_MAN_NAME, t.CREATE_TIME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.METER_CLASS,
+    t.METER_GROUP, t.VALUE_FLAG, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME,
+    t.CHECK_FLAG, t.CHECK_MAN_NO, t.CHECK_MAN_NAME, t.CHECK_TIME, t.METER_MODE, t.RAILWAY_TYPE_NO,
+    t.RAILWAY_TYPE_NAME, T1.ARRIVAL, T1.STATION, T1.MEMO
+    from METER_WORK_HOOK_ACT_FIRST t,PRE_HOOK_SCALE t1
+    where t.ACTUAL_FIRST_NO= #{actualFirstNo,jdbcType=VARCHAR} and t1.PREDICTION_NO= #{predictionNo,jdbcType=VARCHAR}
+  </select>
+
+  <!-- 查询:根据传入时间和车号,查询给定时间段去重车号 -->
+  <select id="distinctCarNo" parameterType="java.lang.String" resultMap="BaseResultMap">
+    SELECT distinct RAILWAY_NO
+    from METER_WORK_HOOK_ACT_FIRST
+    where VALUE_FLAG != '0' and RAILWAY_NO like '%${railwayNo}'
+    <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+      and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
+  </select>
 </mapper>

+ 24 - 0
src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/service/IMeterWorkHookActFirstService.java

@@ -1,9 +1,14 @@
 package com.steerinfo.meterwork.meterworkhookactfirst.service;
 
 import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst;
+import com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst;
+
 import java.util.Date;
 import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
 
 /**
  * MeterWorkHookActFirst服务接口:
@@ -20,4 +25,23 @@ import java.math.BigDecimal;
  */
 public interface IMeterWorkHookActFirstService extends IBaseService<MeterWorkHookActFirst, String>{
 
+    int checkandadd(MeterWorkHookActFirst model);
+
+    int checkandupdate(MeterWorkHookActFirst model);
+
+    int audit(MeterWorkHookActFirst model);
+
+    int unaudit(MeterWorkHookActFirst model);
+
+    int updateRailwayNo(MeterWorkHookActFirst model);
+
+    int abolish(MeterWorkHookActFirst model);
+
+    int recover(MeterWorkHookActFirst model);
+
+    MeterWorkHookActFirst match(String actualFirstNo, String predictionNo);
+
+    int remove(MeterWorkHookActFirst model);
+
+    List<String> distinctCarNo(String railwayNo, String startTime, String endTime);
 }

+ 427 - 2
src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/service/impl/MeterWorkHookActFirstServiceImpl.java

@@ -2,13 +2,27 @@ package com.steerinfo.meterwork.meterworkhookactfirst.service.impl;
 
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
-import com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.user.UserPayload;
+import com.steerinfo.meterwork.constants.DbConstants;
+import com.steerinfo.meterwork.except.MarkerMetException;
 import com.steerinfo.meterwork.meterworkhookactfirst.mapper.MeterWorkHookActFirstMapper;
+import com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst;
 import com.steerinfo.meterwork.meterworkhookactfirst.service.IMeterWorkHookActFirstService;
+import com.steerinfo.pretrack.prehookscale.mapper.PreHookScaleMapper;
+import com.steerinfo.pretrack.prehookscale.model.PreHookScale;
+import com.steerinfo.util.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
 import java.util.Date;
-import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * MeterWorkHookActFirst服务实现:
@@ -29,8 +43,419 @@ public class MeterWorkHookActFirstServiceImpl extends BaseServiceImpl<MeterWorkH
     @Autowired
     private MeterWorkHookActFirstMapper meterWorkHookActFirstMapper;
 
+    @Resource
+    private PreHookScaleMapper preHookScaleMapper;
+
     @Override
     protected IBaseMapper<MeterWorkHookActFirst, String> getMapper() {
         return meterWorkHookActFirstMapper;
     }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int checkandadd(MeterWorkHookActFirst model) {
+        try {
+            check(model);
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String no = meterWorkHookActFirstMapper.getNewID(sdf.format(new Date()));
+            model.setActualFirstNo(sdf.format(new Date()) + no);
+            int num = meterWorkHookActFirstMapper.insertSelective(model);
+            return num;
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int checkandupdate(MeterWorkHookActFirst model) {
+        try {
+            check(model);
+            if (model.getValueFlag().equals(DbConstants.NET)) {
+                throw new MarkerMetException(500, "已经结净的数据无法修改!!");
+            }
+            int num = meterWorkHookActFirstMapper.updateByPrimaryKeySelective(model);
+
+            PreHookScale scale = firstToScale(model);
+            if (scale != null && scale.getPredictionNo() != null) {
+                scale.setUpdateTime(new Date());
+                scale.setUpdateManName(model.getUpdateManName());
+                scale.setUpdateManNo(model.getUpdateManNo());
+                preHookScaleMapper.updateByPrimaryKeySelective(scale);
+            }
+
+            return num;
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+    private void check(MeterWorkHookActFirst model) throws MarkerMetException {
+        if ("001019005".equals(model.getRailwayTypeNo())) {
+            if (model.getRailwayNo() == null || model.getRailwayNo().equals("")) {
+                throw new MarkerMetException(500, "火车车号不能为空");
+            }
+        }
+        if (model.getBaseSpotNo() == null || model.getBaseSpotNo().equals("")) {
+            throw new MarkerMetException(500, "计量点编号不能为空");
+        }
+        if (model.getBaseSpotName() == null || model.getBaseSpotName().equals("")) {
+            throw new MarkerMetException(500, "计量点名称不能为空");
+        }
+        UserPayload payload = UserPayload.getCurrUser();
+        String userId = payload.getId();
+        String userName = payload.getUserName();
+        if (StringUtils.isEmpty(model.getActualFirstNo())) {
+            model.setCreateManNo(userId);
+            model.setCreateManName(userName);
+            model.setCreateTime(new Date());
+            model.setValueFlag(DbConstants.VALID);
+            model.setCheckFlag(DbConstants.INVALID);
+        } else {
+            model.setUpdateTime(new Date());
+            model.setUpdateManNo(userId);
+            model.setUpdateManName(userName);
+        }
+    }
+
+    /**
+     * 一次计量实体,转换为预报实体
+     *
+     * @param first
+     * @return
+     */
+    public PreHookScale firstToScale(MeterWorkHookActFirst first) {
+        PreHookScale scale = new PreHookScale();
+        scale.setPredictionNo(first.getPredictionNo());
+        scale.setNoticeNo(first.getNoticeNo());
+        scale.setMatterNo(first.getMatterNo());
+        scale.setMatterName(first.getMatterName());
+        scale.setContractNo(first.getContractNo());
+        scale.setBatchNo(first.getBatchNo());
+        scale.setCustomerSupplierNo(first.getCustomerSupplierNo());
+        scale.setCustomerSupplierName(first.getCustomerSupplierName());
+        scale.setForwardingUnitNo(first.getForwardingUnitNo());
+        scale.setForwardingUnitName(first.getForwardingUnitName());
+        scale.setReceivingUintNo(first.getReceivingUintNo());
+        scale.setReceivingUintName(first.getReceivingUintName());
+        scale.setMaterialNo(first.getMaterialNo());
+        scale.setMaterialName(first.getMaterialName());
+        scale.setSpecNo(first.getSpecNo());
+        scale.setSpecName(first.getSpecName());
+        scale.setLoadPointNo(first.getLoadPointNo());
+        scale.setLoadPointName(first.getLoadPointName());
+        scale.setSampleNo(first.getSampleNo());
+        scale.setSampleVoucher(first.getSampleVoucher());
+        scale.setCarrierUnitNo(first.getCarrierUnitNo());
+        scale.setCarrierUnitName(first.getCarrierUnitName());
+        scale.setMeterTypeNo(first.getMeterTypeNo());
+        scale.setMeterTypeName(first.getMeterTypeName());
+        scale.setMemo(first.getMemo());
+        scale.setArrival(first.getArrival());
+        scale.setStation(first.getStation());
+        scale.setSourceArea(first.getSourceArea());
+        return scale;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int audit(MeterWorkHookActFirst model) {
+        try {
+            check(model);
+            if (model.getCheckFlag().equals('0')) {
+                model.setCheckFlag(DbConstants.VALID);
+            } else {
+                throw new MarkerMetException(500, "当前状态不可审核");
+            }
+            int num = meterWorkHookActFirstMapper.updateByPrimaryKeySelective(model);
+            return num;
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int unaudit(MeterWorkHookActFirst model) {
+        try {
+            check(model);
+            if (model.getCheckFlag().equals('1')) {
+                model.setCheckFlag(DbConstants.INVALID);
+            } else {
+                throw new MarkerMetException(500, "该数据未审核");
+            }
+            int num = meterWorkHookActFirstMapper.updateByPrimaryKeySelective(model);
+            return num;
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int updateRailwayNo(MeterWorkHookActFirst model) {
+        try {
+            ckeckcar(model);
+            int num = meterWorkHookActFirstMapper.updateByPrimaryKeySelective(model);
+            return num;
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+    private void ckeckcar(MeterWorkHookActFirst model) throws MarkerMetException {
+        if (model.getActualFirstNo() == null || "".equals(model.getActualFirstNo())) {
+            throw new MarkerMetException(500, "操作数据主键不能为空");
+        }
+        if (model.getValueFlag().equals("2")) {
+            throw new MarkerMetException(500, "已经结净的数据不能进行修改");
+        }
+        if (model.getPredictionNo() != null || "".equals(model.getPredictionNo())) {
+            throw new MarkerMetException(500, "已经匹配委托的数据无法修改车号!!");
+        }
+        if (model.getRailwayNo() == null || model.getRailwayNo().equals("")) {
+            throw new MarkerMetException(500, "火车号不能为空");
+        }
+        UserPayload payload = UserPayload.getCurrUser();
+        String userId = payload.getId();
+        String userName = payload.getUserName();
+        model.setUpdateTime(new Date());
+        model.setUpdateManNo(userId);
+        model.setUpdateManName(userName);
+    }
+
+    /**
+     * 除了结净状态外,其他状态数据:未使用,有效已匹配均可废除
+     * @param model
+     * @return
+     */
+    //@Override
+    //@Transactional(rollbackFor = Exception.class)
+    //public int abolish(MeterWorkHookActFirst model) {
+    //    try {
+    //        if (model == null) {
+    //            throw new MarkerMetException(500, "参数为空!!");
+    //        }
+    //        check(model);
+    //        if (model.getValueFlag().equals(ActFirstValueFlag.NET)) {
+    //            throw new MarkerMetException(500, "已结净的数据不可再废除!!");
+    //        }
+    //        if (model.getValueFlag().equals(ActFirstValueFlag.ABOLISH)) {
+    //            throw new MarkerMetException(500, "该数据已经是废除状态,不可重复废除!!");
+    //        }
+    //
+    //        model.setValueFlag(ActFirstValueFlag.ABOLISH);
+    //        int num = meterWorkHookActFirstMapper.updateByPrimaryKeySelective(model);
+    //        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+    //            PreHookScale scale = preHookScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+    //            if (scale != null && StringUtils.isNotEmpty(scale.getPredictionNo())) {
+    //                scale.setPredictionNo(model.getPredictionNo());
+    //                scale.setUpdateTime(new Date());
+    //                scale.setUpdateManName(model.getUpdateManName());
+    //                scale.setUpdateManNo(model.getUpdateManNo());
+    //                scale.setpValueFlag(scale.getValueFlag());
+    //                scale.setValueFlag("3");
+    //                preHookScaleMapper.updateByPrimaryKeySelective(scale);
+    //            }
+    //        }
+    //        return num;
+    //    } catch (MarkerMetException e) {
+    //        throw e;
+    //    }
+    //}
+
+    /**
+     *只有未使用状态的数据才允许废除
+     * @param model
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int abolish(MeterWorkHookActFirst model) {
+        try {
+            if (model == null) {
+                throw new MarkerMetException(500, "参数为空!!");
+            }
+            check(model);
+            if (model.getValueFlag().equals("2")) {
+                throw new MarkerMetException(500, "已结净的数据不可再废除!!");
+            }
+            if (model.getValueFlag().equals("0")) {
+                throw new MarkerMetException(500, "该数据已经是废除状态,不可重复废除!!");
+            }
+            if (model.getValueFlag().equals("1")) {
+                throw new MarkerMetException(500, "已匹配委托的数据不可再废除!!");
+            }
+
+            model.setValueFlag("0");
+            int num = meterWorkHookActFirstMapper.updateByPrimaryKeySelective(model);
+
+            return num;
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+    /**
+     * 除了结净状态外,其他状态数据均可启用
+     * @param model
+     * @return
+     */
+    //@Override
+    //@Transactional(rollbackFor = Exception.class)
+    //public int recover(MeterWorkHookActFirst model) {
+    //    try {
+    //        if (model == null) {
+    //            throw new MarkerMetException(500, "参数为空!!");
+    //        }
+    //        check(model);
+    //        if (model.getValueFlag().equals(ActFirstValueFlag.NET)) {
+    //            throw new MarkerMetException(500, "已结净状态数据无法启用");
+    //        }
+    //        if (model.getPredictionNo() != null && !"".equals(model.getPredictionNo())) {
+    //            model.setValueFlag("1");
+    //        } else {
+    //            model.setValueFlag("3");
+    //        }
+    //
+    //        int num = meterWorkHookActFirstMapper.updateByPrimaryKeySelective(model);
+    //
+    //        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+    //            PreHookScale scale = preHookScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+    //            if (scale != null && StringUtils.isNotEmpty(scale.getPredictionNo())) {
+    //                scale.setPredictionNo(model.getPredictionNo());
+    //                scale.setUpdateTime(new Date());
+    //                scale.setUpdateManName(model.getUpdateManName());
+    //                scale.setUpdateManNo(model.getUpdateManNo());
+    //                scale.setpValueFlag(scale.getValueFlag());
+    //                scale.setValueFlag("4");
+    //                preHookScaleMapper.updateByPrimaryKeySelective(scale);
+    //            }
+    //        }
+    //        return num;
+    //    } catch (MarkerMetException e) {
+    //        throw e;
+    //    }
+    //}
+
+    /**
+     * 只有已废除状态,且预报编号为空的数据才允许启用
+     * @param model
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int recover(MeterWorkHookActFirst model) {
+        try {
+            if (model == null) {
+                throw new MarkerMetException(500, "参数为空!!");
+            }
+            check(model);
+            if (model.getValueFlag().equals("0") && StringUtils.isEmpty(model.getPredictionNo())) {
+                model.setValueFlag("3");
+                int num = meterWorkHookActFirstMapper.updateByPrimaryKeySelective(model);
+                return num;
+            }else {
+                throw new MarkerMetException(500, "数据状态不对无法启用,只有已废除状态数据才可启用!!");
+            }
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+    /**
+     * 一次计量信息与预报信息进行匹配
+     *
+     * @param actualFirstNo
+     * @param predictionNo
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public MeterWorkHookActFirst match(String actualFirstNo, String predictionNo){
+        try {
+            if (actualFirstNo == null || "".equals(actualFirstNo)) {
+                throw new MarkerMetException(500, "计量作业编号为空!!");
+            }
+            if (predictionNo == null || "".equals(predictionNo)) {
+                throw new MarkerMetException(500, "预报编号为空!!");
+            }
+            MeterWorkHookActFirst meterWorkHookActFirst = meterWorkHookActFirstMapper.selectByPrimaryKey(actualFirstNo);
+            if (meterWorkHookActFirst == null) {
+                throw new MarkerMetException(500, "该计量作业信息不存在");
+            }
+            if (meterWorkHookActFirst.getPredictionNo() != null && !"".equals(meterWorkHookActFirst.getPredictionNo())) {
+                throw new MarkerMetException(500, "该计量作业已匹配!!");
+            }
+            MeterWorkHookActFirst model = meterWorkHookActFirstMapper.selectAndMatch(actualFirstNo, predictionNo);
+            model.setValueFlag("1");
+            model.setUpdateTime(new Date());
+            model.setUpdateManNo("system");
+            model.setUpdateManName("吊钩秤一次计量匹配操作");
+
+            PreHookScale prs = preHookScaleMapper.selectByPrimaryKey(predictionNo);
+            if (prs == null) {
+                throw new MarkerMetException(500, "该预报信息不存在");
+            }
+            prs.setValueFlag("4"); //使用中
+            prs.setUpdateTime(new Date());
+            prs.setUpdateManNo("system");
+            prs.setUpdateManName("吊钩秤一次计量匹配操作");
+//            prs.setNote(); 需要添加修改原因写入
+            preHookScaleMapper.updateByPrimaryKeySelective(prs);
+            meterWorkHookActFirstMapper.updateByPrimaryKeySelective(model);
+            return model;
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+    /**
+     * 一次计量数据撤销匹配的委托
+     * @param model
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int remove(MeterWorkHookActFirst model) {
+        try {
+            if (model == null) {
+                throw new MarkerMetException(500, "参数为空!!");
+            }
+            if (model.getPredictionNo() == null || "".equals(model.getPredictionNo())) {
+                throw new MarkerMetException(500, "该条数据还未匹配委托!!");
+            }
+
+            PreHookScale pls = preHookScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+            pls.setPredictionNo(model.getPredictionNo());
+
+            UserPayload payload = UserPayload.getCurrUser();
+            String userId = payload.getId();
+            String userName = payload.getUserName();
+            model.setUpdateManNo(userId);
+            pls.setUpdateManName(userName);
+            pls.setUpdateTime(new Date());
+            pls.setpValueFlag(pls.getValueFlag());
+            pls.setValueFlag("1");
+
+            preHookScaleMapper.updateByPrimaryKeySelective(pls);
+            MeterWorkHookActFirst mwcaf = meterWorkHookActFirstMapper.selectAndRemove(model.getActualFirstNo());
+            mwcaf.setValueFlag("3");
+            int num = meterWorkHookActFirstMapper.updateByPrimaryKey(mwcaf);
+            return num;
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public List<String> distinctCarNo(String railwayNo, String startTime, String endTime) {
+        HashMap<String, Object> obj = new HashMap<>();
+        obj.put("railwayNo", railwayNo);
+        obj.put("startTime", startTime);
+        obj.put("endTime", endTime);
+        List<String> list = meterWorkHookActFirstMapper.distinctCarNo(obj).stream().map(MeterWorkHookActFirst::getRailwayNo).collect(Collectors.toList());
+        return list;
+    }
 }

+ 164 - 0
src/main/java/com/steerinfo/meterwork/meterworkhookactual/controller/MeterWorkHookActualController.java

@@ -4,8 +4,10 @@ import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.meterwork.except.MarkerMetException;
 import com.steerinfo.meterwork.meterworkhookactual.model.MeterWorkHookActual;
 import com.steerinfo.meterwork.meterworkhookactual.service.IMeterWorkHookActualService;
+import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
@@ -107,4 +109,166 @@ public class MeterWorkHookActualController extends BaseRESTfulController {
     	}
       return success();
     }
+
+    @ApiOperation(value = "新增数据-手输皮重", notes = "根据选中的毛重数据和输入的皮重新增一条净重数据")
+    @ApiImplicitParam(name = "MeterWorkHookActual", value = "详细实体MeterWorkHookActual", required = true, dataType = "MeterWorkHookActual")
+    @PostMapping(value = "/add")
+    public RESTfulResult addData(@RequestBody MeterWorkHookActual model) {
+        try {
+            int num = meterWorkHookActualService.addData(model);
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("操作失败");
+            }
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
+    @ApiOperation(value = "火车号汇总统计汇总", notes = "根据传入时间和火车号,查询给定时间段去重车号")
+    @GetMapping(value = "/distinctCarNo")
+    public RESTfulResult distinctCarNo(String railwayNo, String startTime, String endTime) {
+        RESTfulResult rm = failed();
+        try {
+            List<String> rows = meterWorkHookActualService.distinctCarNo(railwayNo, startTime, endTime);
+            return success(rows);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "发布", notes = "将结净数据置为发布状态")
+    @ApiImplicitParam(name = "model", value = "详细实体MeterWorkHookActual", required = true, dataType = "MeterWorkHookActual")
+    @PostMapping(value = "/publish")
+    public RESTfulResult publish(@RequestBody MeterWorkHookActual model) {
+        RESTfulResult rm = failed();
+        try {
+            int num = meterWorkHookActualService.publish(model);
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("操作失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "取消发布", notes = "将结净数据重置为未发布状态")
+    @ApiImplicitParam(name = "model", value = "详细实体MeterWorkHookActual", required = true, dataType = "MeterWorkHookActual")
+    @PostMapping(value = "/cancel")
+    public RESTfulResult cancel(@RequestBody MeterWorkHookActual model) {
+        RESTfulResult rm = failed();
+        try {
+            int num = meterWorkHookActualService.cancel(model);
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("操作失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "结净")
+    @PostMapping(value = "/clean")
+    public RESTfulResult clean(@RequestParam String actualFirstNo, String dataNo, String predictionNo) {
+        RESTfulResult rm = failed();
+        try {
+            MeterWorkHookActual mwca = meterWorkHookActualService.clean(actualFirstNo, dataNo, predictionNo);
+            return success(mwca);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "毛皮解除", notes = "将结净后的数据进行还原(毛皮解除操作)")
+    @PostMapping(value = "/remove")
+    public RESTfulResult remove(@RequestBody List<MeterWorkHookActual> models) {
+        RESTfulResult rm = failed();
+        try {
+            int num = meterWorkHookActualService.remove(models);
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("操作失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "匹配委托")
+    @PostMapping(value = "/matchPrediction")
+    public RESTfulResult matchPrediction(@RequestParam String actualNo, String predictionNo, String note) {
+        RESTfulResult rm = failed();
+        try {
+            MeterWorkHookActual mwca = meterWorkHookActualService.matchPrediction(actualNo, predictionNo, note);
+            return success(mwca);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "解除委托")
+    @PostMapping(value = "/removePrediction")
+    public RESTfulResult removePrediction(@RequestBody MeterWorkHookActual model) {
+        RESTfulResult rm = failed();
+        try {
+            MeterWorkHookActual mwca = meterWorkHookActualService.cleanPrediction(model);
+            return success(mwca);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
 }

+ 21 - 0
src/main/java/com/steerinfo/meterwork/meterworkhookactual/mapper/MeterWorkHookActualMapper.java

@@ -3,8 +3,29 @@ package com.steerinfo.meterwork.meterworkhookactual.mapper;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.meterwork.meterworkhookactual.model.MeterWorkHookActual;
 import java.math.*;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
 import org.apache.ibatis.annotations.Mapper;
 
 @Mapper
 public interface MeterWorkHookActualMapper extends IBaseMapper<MeterWorkHookActual, String> {
+    String getNewID(String format);
+
+    /**
+     * 根据传入时间和车号,查询给定时间段去重车号
+     * @param obj
+     * @return
+     */
+    List<MeterWorkHookActual> distinctCarNo(HashMap<String, Object> obj);
+
+    MeterWorkHookActual manualAddPre(String actualFirstNo, String dataNo, String predictionNo);
+
+    MeterWorkHookActual manualAdd(String actualFirstNo, String dataNo);
+
+    MeterWorkHookActual matchPredcition(String actualNo, String predictionNo);
+
+    MeterWorkHookActual cleanPredcition(String actualNo);
 }

+ 82 - 1
src/main/java/com/steerinfo/meterwork/meterworkhookactual/mapper/MeterWorkHookActualMapper.xml

@@ -2039,5 +2039,86 @@
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  
+  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
+    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(ACTUAL_NO, LENGTH(ACTUAL_NO) - 3))),0) + 1,4,'0') ACTUAL_NO
+    FROM METER_WORK_HOOK_ACTUAL where instr(ACTUAL_NO,#{afl,jdbcType=VARCHAR})>0
+  </select>
+
+  <!-- 查询:根据传入时间和车号,查询给定时间段去重车号 -->
+  <select id="distinctCarNo" parameterType="java.lang.String" resultMap="BaseResultMap">
+    SELECT distinct RAILWAY_NO
+    from METER_WORK_HOOK_ACTUAL
+    where VALUE_FLAG != '0' and RAILWAY_NO like '%${railwayNo}%'
+    <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+      and  NET_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and NET_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
+  </select>
+  <select id="manualAddPre" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select T3.prediction_no PREDICTION_NO, T3.notice_no NOTICE_NO, t1.railway_no RAILWAY_NO, T3.railway_carriage_no RAILWAY_CARRIAGE_NO, T3.matter_no MATTER_NO,
+           T3.matter_name MATTER_NAME, T3.contract_no CONTRACT_NO, T3.batch_no BATCH_NO, T3.customer_supplier_no CUSTOMER_SUPPLIER_NO,
+           T3.customer_supplier_name CUSTOMER_SUPPLIER_NAME, T3.forwarding_unit_no FORWARDING_UNIT_NO, T3.forwarding_unit_name FORWARDING_UNIT_NAME,
+           T3.receiving_uint_no RECEIVING_UINT_NO, T3.receiving_uint_name RECEIVING_UINT_NAME, T3.material_no MATERIAL_NO,
+           T3.material_name MATERIAL_NAME, T3.spec_no SPEC_NO, T3.spec_name SPEC_NAME, T3.load_point_no LOAD_POINT_NO, T3.load_point_name LOAD_POINT_NAME,
+           T3.sample_no SAMPLE_NO,T3.sample_voucher SAMPLE_VOUCHER,T3.carrier_unit_no CARRIER_UNIT_NO,T3.carrier_unit_name CARRIER_UNIT_NAME,
+           T3.meter_type_no METER_TYPE_NO, T3.meter_type_name METER_TYPE_NAME,T1.meter_process_no METER_PROCESS_NO, T1.meter_process_edition_no METER_PROCESS_EDITION_NO,
+           t1.actual_first_no ACTUAL_FIRST1_NO, t1.meter_weight GROSS_WEIGHT, t1.create_man_no GROSS_MAN_NO, t1.create_man_name GROSS_MAN_NAME, t1.create_time GROSS_TIME,
+           t1.base_spot_no BASE_SPOT1_NO, t1.base_spot_name BASE_SPOT1_NAME,t1.meter_class GROSS_CLASS, t1.meter_group GROSS_GROUP, t1.meter_mode GROSS_MODE,t1.railway_type_no RAILWAY_TYPE_NO,t1.railway_type_name RAILWAY_TYPE_NAME,
+           t2.actual_first_no ACTUAL_FIRST2_NO, t2.meter_weight TARE_WEIGHT, t2.create_man_no TARE_MAN_NO, t2.create_man_name TARE_MAN_NAME, t2.create_time TARE_TIME,
+           t2.base_spot_no BASE_SPOT2_NO, t2.base_spot_name BASE_SPOT2_NAME, t2.meter_class TARE_CLASS, t2.meter_group TARE_GROUP,t2.meter_mode TARE_MODE
+            ,t2.arrival ARRIVAL, t2.station STATION,t2.memo MEMO,t2.source_area SOURCE_AREA
+    from METER_WORK_HOOK_ACT_FIRST t1,METER_WORK_HOOK_ACT_FIRST t2, PRE_HOOK_SCALE T3
+    where t1.actual_first_no=#{actualFirstNo,jdbcType=VARCHAR} and t2.actual_first_no=#{dataNo,jdbcType=VARCHAR} AND T3.prediction_no =#{predictionNo,jdbcType=VARCHAR}
+  </select>
+
+  <select id="manualAdd" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select t1.prediction_no PREDICTION_NO, t1.notice_no NOTICE_NO, t1.railway_no RAILWAY_NO, t1.railway_carriage_no RAILWAY_CARRIAGE_NO, t1.matter_no MATTER_NO,
+       t1.matter_name MATTER_NAME, t1.contract_no CONTRACT_NO, t1.batch_no BATCH_NO, t1.customer_supplier_no CUSTOMER_SUPPLIER_NO,
+       t1.customer_supplier_name CUSTOMER_SUPPLIER_NAME, t1.forwarding_unit_no FORWARDING_UNIT_NO, t1.forwarding_unit_name FORWARDING_UNIT_NAME,
+       t1.receiving_uint_no RECEIVING_UINT_NO, t1.receiving_uint_name RECEIVING_UINT_NAME, t1.material_no MATERIAL_NO,
+       t1.material_name MATERIAL_NAME, t1.spec_no SPEC_NO, t1.spec_name SPEC_NAME, t1.load_point_no LOAD_POINT_NO, t1.load_point_name LOAD_POINT_NAME,
+       t1.sample_no SAMPLE_NO,t1.sample_voucher SAMPLE_VOUCHER,t1.carrier_unit_no CARRIER_UNIT_NO,t1.carrier_unit_name CARRIER_UNIT_NAME,
+       t1.meter_type_no METER_TYPE_NO, t1.meter_type_name METER_TYPE_NAME,t1.meter_process_no METER_PROCESS_NO, t1.meter_process_edition_no METER_PROCESS_EDITION_NO,
+       t1.actual_first_no ACTUAL_FIRST1_NO, t1.meter_weight GROSS_WEIGHT, t1.create_man_no GROSS_MAN_NO, t1.create_man_name GROSS_MAN_NAME, t1.create_time GROSS_TIME,
+       t1.base_spot_no BASE_SPOT1_NO, t1.base_spot_name BASE_SPOT1_NAME,t1.meter_class GROSS_CLASS, t1.meter_group GROSS_GROUP, t1.meter_mode GROSS_MODE,t1.railway_type_no RAILWAY_TYPE_NO,t1.railway_type_name RAILWAY_TYPE_NAME,
+       t2.actual_first_no ACTUAL_FIRST2_NO, t2.meter_weight TARE_WEIGHT, t2.create_man_no TARE_MAN_NO, t2.create_man_name TARE_MAN_NAME, t2.create_time TARE_TIME,
+       t2.base_spot_no BASE_SPOT2_NO, t2.base_spot_name BASE_SPOT2_NAME, t2.meter_class TARE_CLASS, t2.meter_group TARE_GROUP,t2.meter_mode TARE_MODE
+       ,t2.arrival ARRIVAL, t2.station STATION,t2.memo MEMO,t2.source_area SOURCE_AREA
+    from METER_WORK_HOOK_ACT_FIRST t1,METER_WORK_HOOK_ACT_FIRST t2
+    where t1.actual_first_no=#{actualFirstNo,jdbcType=VARCHAR} and t2.actual_first_no=#{dataNo,jdbcType=VARCHAR}
+ </select>
+
+  <select id="matchPredcition" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select t.actual_no, t1.prediction_no, t1.notice_no,t1.railway_no,t1.railway_carriage_no,
+           t1.matter_no,t1.matter_name,t1.contract_no,t1.batch_no,t1.customer_supplier_no,
+           t1.customer_supplier_name,t1.forwarding_unit_no,t1.forwarding_unit_name,t1.receiving_uint_no,
+           t1.receiving_uint_name,t1.material_no,t1.material_name, t1.spec_no,t1.spec_name,t1.load_point_no,
+           t1.load_point_name,t1.sample_voucher,t1.carrier_unit_no,t1.carrier_unit_name,t1.meter_type_no,
+           t1.meter_type_name,t.actual_first1_no, t.gross_weight,t.gross_man_no,t.gross_man_name,
+           t1.voucher_identity, t1.voucher_item, t1.business_group, t1.temp_conveyance, t1.conveyance_type,
+           t1.resource_system, t1.group_package_amount, t1.group_package_unit, t1.package_amount,
+           t1.package_unit, t1.theory_amount, t1.measure_batch,t1.measure_batch_count,t1.sender_type,
+           t1.sender_remark,t1.receiver_type, t1.receiver_remark,t1.amount_unit,
+           t.gross_time,t.base_spot1_no, t.base_spot1_name,t.gross_class,t.gross_group,t.gross_mode,
+           t.actual_first2_no,t.tare_weight,t.tare_man_no,t.tare_man_name,t.tare_time,t.base_spot2_no,
+           t.base_spot2_name,t.tare_class,t.tare_group,t.tare_mode, t.net_weight,t.net_man_no,
+           t.net_man_name,t.net_time,t.net_spot3_no,t.net_spot3_name,t.net_class,t.net_group,
+           t.net_mode,t.value_flag,t.upload_flag,t.check_man_no,t.check_man_name,t.check_time,
+           t.upload_man_no,t.upload_man_name,t.upload_time,t.sample_no,t.railway_type_no,
+           t.railway_type_name, t.memo,t.water_num,t1.arrival,t1.station,t.update_man_no,
+           t.update_man_name, t.update_time,t.source_area
+      from METER_WORK_HOOK_ACTUAL t, PRE_HOOK_SCALE t1 where t.actual_no = #{actualNo,jdbcType=VARCHAR} and t1.prediction_no = #{predictionNo,jdbcType=VARCHAR}
+  </select>
+
+  <select id="cleanPredcition" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select t.actual_no,t.actual_first1_no, t.railway_no, t.gross_weight,t.gross_man_no,t.gross_man_name,
+           t.gross_time,t.base_spot1_no, t.base_spot1_name,t.gross_class,t.gross_group,t.gross_mode,
+           t.actual_first2_no,t.tare_weight,t.tare_man_no,t.tare_man_name,t.tare_time,t.base_spot2_no,
+           t.base_spot2_name,t.tare_class,t.tare_group,t.tare_mode, t.net_weight,t.net_man_no,
+           t.net_man_name,t.net_time,t.net_spot3_no,t.net_spot3_name,t.net_class,t.net_group,
+           t.net_mode,t.value_flag,t.upload_flag,t.check_man_no,t.check_man_name,t.check_time,
+           t.upload_man_no,t.upload_man_name,t.upload_time,t.sample_no,t.railway_type_no,
+           t.railway_type_name, t.memo,t.water_num,t.update_man_no,
+           t.update_man_name, t.update_time,t.source_area
+    from METER_WORK_HOOK_ACTUAL t where t.actual_no = #{actualNo,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 19 - 0
src/main/java/com/steerinfo/meterwork/meterworkhookactual/service/IMeterWorkHookActualService.java

@@ -2,8 +2,11 @@ package com.steerinfo.meterwork.meterworkhookactual.service;
 
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.meterwork.meterworkhookactual.model.MeterWorkHookActual;
+import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
+
 import java.util.Date;
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * MeterWorkHookActual服务接口:
@@ -20,4 +23,20 @@ import java.math.BigDecimal;
  */
 public interface IMeterWorkHookActualService extends IBaseService<MeterWorkHookActual, String>{
 
+    int addData(MeterWorkHookActual model);
+
+    List<String> distinctCarNo(String carNo, String startTime, String endTime);
+
+
+    int publish(MeterWorkHookActual model);
+
+    int cancel(MeterWorkHookActual model);
+
+    int remove(List<MeterWorkHookActual> models);
+
+    MeterWorkHookActual clean(String actualFirstNo, String dataNo, String predictionNo);
+
+    MeterWorkHookActual matchPrediction(String actualNo, String predictionNo, String note);
+
+    MeterWorkHookActual cleanPrediction(MeterWorkHookActual model);
 }

+ 502 - 0
src/main/java/com/steerinfo/meterwork/meterworkhookactual/service/impl/MeterWorkHookActualServiceImpl.java

@@ -2,13 +2,29 @@ package com.steerinfo.meterwork.meterworkhookactual.service.impl;
 
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.framework.user.UserPayload;
+import com.steerinfo.meterwork.constants.DbConstants;
+import com.steerinfo.meterwork.except.MarkerMetException;
+import com.steerinfo.meterwork.meterworkhookactfirst.mapper.MeterWorkHookActFirstMapper;
+import com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst;
 import com.steerinfo.meterwork.meterworkhookactual.model.MeterWorkHookActual;
 import com.steerinfo.meterwork.meterworkhookactual.mapper.MeterWorkHookActualMapper;
 import com.steerinfo.meterwork.meterworkhookactual.service.IMeterWorkHookActualService;
+import com.steerinfo.pretrack.prehookscale.mapper.PreHookScaleMapper;
+import com.steerinfo.pretrack.prehookscale.model.PreHookScale;
+import com.steerinfo.util.StringUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * MeterWorkHookActual服务实现:
@@ -29,8 +45,494 @@ public class MeterWorkHookActualServiceImpl extends BaseServiceImpl<MeterWorkHoo
     @Autowired
     private MeterWorkHookActualMapper meterWorkHookActualMapper;
 
+    @Resource
+    private MeterWorkHookActFirstMapper meterWorkHookActFirstMapper;
+
+    @Resource
+    private PreHookScaleMapper preHookScaleMapper;
+
     @Override
     protected IBaseMapper<MeterWorkHookActual, String> getMapper() {
         return meterWorkHookActualMapper;
     }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int addData(MeterWorkHookActual model) throws MarkerMetException {
+        if (model.getActualFirst1No() == null || "".equals(model.getActualFirst1No())) {
+            throw new MarkerMetException(500, "毛重数据主键不能为空");
+        }
+        if (model.getRailwayNo() == null || "".equals(model.getRailwayNo())) {
+            throw new MarkerMetException(500, "火车号不能为空");
+        }
+        if (model.getPredictionNo() == null || "".equals(model.getPredictionNo())) {
+            throw new MarkerMetException(500, "选中的毛重数据需要先匹配委托");
+        }
+        MeterWorkHookActFirst queryrow = meterWorkHookActFirstMapper.selectByPrimaryKey(model.getActualFirst1No());
+        if (queryrow == null) {
+            throw new MarkerMetException(500, "不存在对应的毛重数据");
+        }
+        UserPayload payload = UserPayload.getCurrUser();
+        String userId = payload.getId();
+        String userName = payload.getUserName();
+
+        // 处理一次计量数据
+        // 毛重
+        queryrow.setUpdateTime(new Date());
+        queryrow.setUpdateManName(userName + ": 一次数据输入历史皮重洁净操作");
+        queryrow.setUpdateManNo(userId);
+        queryrow.setValueFlag("2");
+        meterWorkHookActFirstMapper.updateByPrimaryKey(queryrow);
+
+        // 新增一条皮重
+        MeterWorkHookActFirst tarerow = new MeterWorkHookActFirst();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        Date time = new Date();
+        String idNo = sdf.format(new Date()) + meterWorkHookActFirstMapper.getNewID(sdf.format(time));
+        tarerow.setActualFirstNo(idNo);
+        tarerow.setRailwayNo(model.getRailwayNo());
+        tarerow.setMeterWeight(model.getTareWeight());
+        tarerow.setCreateManName(userName);
+        tarerow.setCreateManNo(userId);
+        tarerow.setCreateTime(new Date());
+        tarerow.setMeterMode("3");
+        //tarerow.setDataSource(queryrow.getDataSource());
+        tarerow.setMemo("吊钩称一次计量数据输入历史皮重结净操作新增皮重数据");
+        tarerow.setValueFlag("2");
+        tarerow.setWeightType("3");
+        int num1 = meterWorkHookActFirstMapper.insertSelective(tarerow);
+
+        // 处理预报信息
+        PreHookScale pres = new PreHookScale();
+        pres.setPredictionNo(model.getPredictionNo());
+        pres.setValueFlag("2");
+        pres.setUpdateManName(userName + ": 使用历史皮重洁净操作");
+        pres.setUpdateTime(new Date());
+        pres.setUpdateManNo(userId);
+        preHookScaleMapper.updateByPrimaryKeySelective(pres);
+
+        // 新增净重数据
+        String idNo2 = sdf.format(new Date()) + meterWorkHookActualMapper.getNewID(sdf.format(time));
+        model.setActualNo(idNo2);
+        model.setActualFirst2No(idNo); //皮重计量编号
+        model.setTareManName(userName);
+        model.setTareManNo(userId);
+        model.setTareTime(time);
+        model.setTareMode("3");
+        if ( model.getGrossWeight().compareTo(model.getTareWeight()) >= 0){
+            model.setNetWeight(model.getGrossWeight().subtract(model.getTareWeight()));
+        }else {
+            throw new MarkerMetException(500, "输入的皮重数据不能大于称重毛重数据!");
+        }
+        model.setNetMode("2");
+        model.setNetTime(time);
+        model.setNetManName(userName);
+        model.setNetManNo(userId);
+        //model.setDataSource(queryrow.getDataSource());
+        model.setValueFlag("1");
+        int num = meterWorkHookActualMapper.insertSelective(model);
+        return num;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public List<String> distinctCarNo(String railwayNo, String startTime, String endTime) {
+        HashMap<String, Object> obj = new HashMap<>();
+        obj.put("railwayNo", railwayNo);
+        obj.put("startTime", startTime);
+        obj.put("endTime", endTime);
+        List<String> list = meterWorkHookActualMapper.distinctCarNo(obj).stream().map(MeterWorkHookActual::getRailwayNo).collect(Collectors.toList());
+        return list;
+    }
+
+    @Override
+    public int publish(MeterWorkHookActual model) {
+        int i = 0;
+        if (model == null) {
+            throw new MarkerMetException(500, "参数为空!!");
+        }
+        if (model.getActualNo() == null || "".equals(model.getActualNo())) {
+            throw new MarkerMetException(500, "数据主键为空");
+        }
+        if (model.getPredictionNo() == null || "".equals(model.getPredictionNo()) || !"1".equals(model.getValueFlag())) {
+            throw new MarkerMetException(500, "只有已匹配委托且未发布的数据才能进行数据发布操作");
+        }
+
+        UserPayload userPayload = new UserPayload();
+        String userName = userPayload.getUserName();
+        String userId = userPayload.getId();
+        model.setValueFlag("2");
+        model.setUpdateTime(new Date());
+        model.setUpdateManName(userName);
+        model.setUpdateManNo(userId);
+        try {
+            meterWorkHookActualMapper.updateByPrimaryKeySelective(model);
+        } catch (Exception e) {
+            throw e;
+        }
+        return ++i;
+    }
+
+    @Override
+    public int cancel(MeterWorkHookActual model) {
+        int i = 0;
+        if (model == null) {
+            throw new MarkerMetException(500, "参数为空!!");
+        }
+        if (model.getActualNo() == null || "".equals(model.getActualNo())) {
+            throw new MarkerMetException(500, "数据主键为空");
+        }
+        if (model.getPredictionNo() == null || "".equals(model.getPredictionNo()) || !"2".equals(model.getValueFlag())) {
+            throw new MarkerMetException(500, "只有已匹配委托且已发布的数据才能进行撤销发布操作");
+        }
+
+        UserPayload userPayload = new UserPayload();
+        String userName = userPayload.getUserName();
+        String userId = userPayload.getId();
+        model.setValueFlag("1");
+        model.setUpdateTime(new Date());
+        model.setUpdateManName(userName);
+        model.setUpdateManNo(userId);
+        try {
+            meterWorkHookActualMapper.updateByPrimaryKeySelective(model);
+        } catch (Exception e) {
+            throw e;
+        }
+        return ++i;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int remove(List<MeterWorkHookActual> models) throws MarkerMetException {
+        try {
+            int num = 0;
+            if (models.size() <= 0 || models == null) {
+                throw new MarkerMetException(500, "参数为空!!!");
+            }
+            for (MeterWorkHookActual model : models) {
+                //毛重
+                MeterWorkHookActFirst mwcaf1 = meterWorkHookActFirstMapper.selectByPrimaryKey(model.getActualFirst1No());
+                if (mwcaf1 == null) {
+                    throw new MarkerMetException(500, "未查询到相应的毛重数据!!");
+                }
+                // 清空委托信息
+                MeterWorkHookActFirst grossrow = meterWorkHookActFirstMapper.selectAndRemove(model.getActualFirst1No());
+                grossrow.setValueFlag("3");
+                UserPayload payload = UserPayload.getCurrUser();
+                String userId = payload.getId();
+                String userName = payload.getUserName();
+                grossrow.setUpdateManNo(userId);
+                grossrow.setUpdateManName(userName);
+                grossrow.setUpdateTime(new Date());
+                meterWorkHookActFirstMapper.updateByPrimaryKey(grossrow);
+                //皮重
+                MeterWorkHookActFirst mwcaf2 = meterWorkHookActFirstMapper.selectByPrimaryKey(model.getActualFirst2No());
+                //MeterBaseRailwayWeight mbrw = meterBaseRailwayWeightMapper.selectByPrimaryKey(model.getActualFirst2No());
+                if (mwcaf2 == null ) {
+                    throw new MarkerMetException(500, "未查询到相应的皮重数据!!");
+                }
+                // 清空委托信息
+                MeterWorkHookActFirst tarerow = meterWorkHookActFirstMapper.selectAndRemove(model.getActualFirst2No());
+                if (tarerow != null) {
+                    tarerow.setValueFlag("3");
+                    tarerow.setUpdateManNo(userId);
+                    tarerow.setUpdateManName(userName);
+                    tarerow.setUpdateTime(new Date());
+                    meterWorkHookActFirstMapper.updateByPrimaryKey(tarerow);
+                }
+                if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                    PreHookScale scale = new PreHookScale();
+                    scale.setPredictionNo(model.getPredictionNo());
+                    scale.setValueFlag("1"); //使用中
+                    scale.setUpdateManNo(userId);
+                    scale.setUpdateManName(userName);
+                    scale.setUpdateTime(new Date());
+                    preHookScaleMapper.updateByPrimaryKeySelective(scale);
+                }
+                meterWorkHookActualMapper.deleteByPrimaryKey(model.getActualNo());
+                num++;
+            }
+
+            return num;
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public MeterWorkHookActual clean(String actualFirstNo, String dataNo, String predictionNo) throws MarkerMetException {
+        try {
+            if (actualFirstNo == null && actualFirstNo.equals("")) {
+                throw new MarkerMetException(500, "毛重数据编号为空");
+            }
+            if (dataNo == null && dataNo.equals("")) {
+                throw new MarkerMetException(500, "皮重数据编号为空");
+            }
+            MeterWorkHookActFirst mwcaf1 = meterWorkHookActFirstMapper.selectByPrimaryKey(actualFirstNo);
+            if (mwcaf1 == null) {
+                throw new MarkerMetException(500, "未查询到相应的毛重数据!!");
+            }
+
+            MeterWorkHookActFirst mwcaf2 = meterWorkHookActFirstMapper.selectByPrimaryKey(dataNo);
+            if (mwcaf2 == null) {
+                throw new MarkerMetException(500, "未查询到相应的皮重数据!!");
+            }
+            if (mwcaf2.getMeterWeight().compareTo(mwcaf1.getMeterWeight()) == 1) {
+                throw new MarkerMetException(500, "皮重重量大于毛重重量!!");
+            }
+
+            // 选中的是否为同一车的数据
+            if (!mwcaf1.getRailwayNo().substring(mwcaf1.getRailwayNo().length()-2).equals(mwcaf2.getRailwayNo().substring(mwcaf2.getRailwayNo().length()-2))) {
+                throw new MarkerMetException(500, "请选择同一灌号的一次计量数据进行结净");
+            }
+
+            // 一次计量数据是否已经完成委托匹配
+            if ((mwcaf1.getPredictionNo() != null && "".equals(mwcaf1.getPredictionNo())) || (mwcaf2.getPredictionNo() != null && "".equals(mwcaf2.getPredictionNo()))) {
+                if (!mwcaf1.getPredictionNo().equals(mwcaf2.getPredictionNo())) {
+                    throw new MarkerMetException(500, "选中的两条一次计量数据匹配的委托不一致,不允许进行洁净操作!!!");
+                } else if (predictionNo != null && !"".equals(predictionNo)) {
+                    throw new MarkerMetException(500, "选中的两条一次计量数据已经匹配委托,请正确选择数据!!!");
+                }
+            }
+
+            String preNo = (predictionNo == null ? mwcaf1.getPredictionNo() : predictionNo);
+
+            //修改预报
+            if (preNo != null && !"".equals(preNo)) {
+                // 选中预报和选中一次计量数据中车号是否一致
+                PreHookScale queryRow = preHookScaleMapper.selectByPrimaryKey(preNo);
+                if (!mwcaf1.getRailwayNo().substring(mwcaf1.getRailwayNo().length()-2).equals(queryRow.getRailwayNo().substring(queryRow.getRailwayNo().length()-2))) {
+                    throw new MarkerMetException(500, "选中预报中吊钩灌号与一次计量数据中灌号不一致!!!");
+                }
+                PreHookScale scale = new PreHookScale();
+                scale.setPredictionNo(preNo);
+                scale.setValueFlag(DbConstants.NET);
+                scale.setUpdateTime(new Date());
+                scale.setUpdateManNo("system");
+                scale.setUpdateManName("二次计量洁净更新");
+                preHookScaleMapper.updateByPrimaryKeySelective(scale);
+            }
+
+            MeterWorkHookActual actualRow = new MeterWorkHookActual();
+
+            // 判断前端是否传入了预报编号
+            if (predictionNo != null && !"".equals(predictionNo)) {
+                // 根据一次计量数据和预报数据生成净重相关信息
+                MeterWorkHookActFirst first1 = meterWorkHookActFirstMapper.selectAndMatch(actualFirstNo, predictionNo);
+                BeanUtils.copyProperties(first1,mwcaf1);
+                MeterWorkHookActFirst first2 = meterWorkHookActFirstMapper.selectAndMatch(dataNo, predictionNo);
+                BeanUtils.copyProperties(first2, mwcaf2);
+                MeterWorkHookActual mwca1 = meterWorkHookActualMapper.manualAddPre(actualFirstNo, dataNo, predictionNo);
+                BeanUtils.copyProperties(mwca1, actualRow);
+            } else {
+                MeterWorkHookActual mwca2 = meterWorkHookActualMapper.manualAdd(actualFirstNo, dataNo);
+                BeanUtils.copyProperties(mwca2, actualRow);
+            }
+
+            mwcaf1.setValueFlag(DbConstants.NET);
+            meterWorkHookActFirstMapper.updateByPrimaryKey(mwcaf1);
+            mwcaf2.setValueFlag(DbConstants.NET);
+            meterWorkHookActFirstMapper.updateByPrimaryKey(mwcaf2);
+
+            cleanCheck(actualRow);
+
+            if (actualRow.getGrossTime().compareTo(actualRow.getTareTime()) == 1) {
+                actualRow.setNetSpot3No(actualRow.getBaseSpot1No());
+                actualRow.setNetSpot3Name(actualRow.getBaseSpot1Name());
+            } else {
+                actualRow.setNetSpot3No(actualRow.getBaseSpot2No());
+                actualRow.setNetSpot3Name(actualRow.getBaseSpot2Name());
+            }
+            actualRow.setNetMode(DbConstants.TYPE);
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String no = meterWorkHookActualMapper.getNewID(sdf.format(new Date()));
+            actualRow.setActualNo(sdf.format(new Date()) + no);
+            actualRow.setNetWeight(mwcaf1.getMeterWeight().subtract(mwcaf2.getMeterWeight()));
+            meterWorkHookActualMapper.insertSelective(actualRow);
+
+            //预报的处理
+            if (StringUtils.isNotEmpty(actualRow.getPredictionNo())) {
+                PreHookScale prs = new PreHookScale();
+                prs.setPredictionNo(actualRow.getPredictionNo());
+                prs.setValueFlag(DbConstants.NET); //已结净
+                prs.setUpdateTime(new Date());
+                prs.setUpdateManNo("system");
+                prs.setUpdateManName("火车二次计量洁净操作");
+                preHookScaleMapper.updateByPrimaryKeySelective(prs);
+            }
+            return actualRow;
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+    private void cleanCheck(MeterWorkHookActual model) throws MarkerMetException {
+        if (model.getRailwayNo() == null || model.getRailwayNo().equals("")) {
+            throw new MarkerMetException(500, "火车车号不能为空");
+        }
+        if (model.getMatterNo() == null || model.getMatterNo().equals("")) {
+            throw new MarkerMetException(500, "物料编号不能为空");
+        }
+        if (model.getMatterName() == null || model.getMatterName().equals("")) {
+            throw new MarkerMetException(500, "物料名称能为空");
+        }
+        if (model.getMeterTypeNo() == null || model.getMeterTypeNo().equals("")) {
+            throw new MarkerMetException(500, "计量类型编号不能为空");
+        }
+        if (model.getMeterTypeName() == null || model.getMeterTypeName().equals("")) {
+            throw new MarkerMetException(500, "计量类型名称不能为空");
+        }
+        if (model.getActualFirst1No() == null || model.getActualFirst1No().equals("")) {
+            throw new MarkerMetException(500, "毛重计量作业编号不能为空");
+        }
+        if (model.getGrossTime() == null || model.getGrossTime().equals("")) {
+            throw new MarkerMetException(500, "毛重计量时间不能为空");
+        }
+        if (model.getBaseSpot1No() == null || model.getBaseSpot1No().equals("")) {
+            throw new MarkerMetException(500, "毛重计量点编号不能为空");
+        }
+        if (model.getBaseSpot1Name() == null || model.getBaseSpot1Name().equals("")) {
+            throw new MarkerMetException(500, "毛重计量点名称不能为空");
+        }
+        if (model.getActualFirst2No() == null || model.getActualFirst2No().equals("")) {
+            throw new MarkerMetException(500, "皮重计量作业编号不能为空");
+        }
+        if (model.getTareTime() == null || model.getTareTime().equals("")) {
+            throw new MarkerMetException(500, "皮重计量时间不能为空");
+        }
+        if (model.getActualNo() == null && model.getValueFlag() == null && (model.getPredictionNo() == null || "".equals(model.getPredictionNo()))) {
+            model.setValueFlag("3"); // 未匹配
+        } else if (model.getActualNo() == null && model.getValueFlag() == null && (model.getPredictionNo() != null && !"".equals(model.getPredictionNo()))) {
+            model.setValueFlag("1"); // 已匹配
+        }
+
+        if (model.getActualNo() == null && model.getUploadFlag() == null)
+            model.setUploadFlag(DbConstants.INVALID);
+        UserPayload payload = UserPayload.getCurrUser();
+        String userId = payload.getId();
+        String userName = payload.getUserName();
+        if (model.getActualNo() == null) {
+            model.setNetTime(new Date());
+            model.setNetManNo(userId);
+            model.setNetManName(userName);
+//            model.setNote();
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public MeterWorkHookActual matchPrediction (String actualNo, String predictionNo, String note) throws MarkerMetException {
+        if (actualNo == null || "".equals(actualNo)) {
+            throw new MarkerMetException(500, "结净数据主键不能为空");
+        }
+        if (predictionNo == null || "".equals(predictionNo)) {
+            throw new MarkerMetException(500, "委托编号不能为空");
+        }
+        MeterWorkHookActual queryrow = meterWorkHookActualMapper.selectByPrimaryKey(actualNo);
+        if (queryrow == null) {
+            throw new MarkerMetException(500, "不存在对应的结净数据");
+        } else if (!queryrow.getValueFlag().equals("3") || queryrow.getPredictionNo() != null || "".equals(queryrow.getPredictionNo())) {
+            throw new MarkerMetException(500, "只有未匹配的净重数据才能进行委托匹配操作");
+        }
+        PreHookScale prerow = preHookScaleMapper.selectByPrimaryKey(predictionNo);
+        if (prerow == null) {
+            throw new MarkerMetException(500, "不存在对应的委托数据");
+        } else if (!prerow.getValueFlag().equals("1")) {
+            throw new MarkerMetException(500, "只有未使用的委托才能进行匹配委托操作");
+        }
+        if (!queryrow.getRailwayNo().equals(prerow.getRailwayNo())) {
+            throw new MarkerMetException(500, "洁净数据中车号和预报中车号不一致,不允许进行匹配委托操作");
+        }
+        UserPayload payload = UserPayload.getCurrUser();
+        String userId = payload.getId();
+        String userName = payload.getUserName();
+
+        // 处理一次计量数据
+        // 毛重
+        MeterWorkHookActFirst grossrow = meterWorkHookActFirstMapper.selectAndMatch(queryrow.getActualFirst1No(), predictionNo);
+        grossrow.setUpdateTime(new Date());
+        grossrow.setUpdateManName(userName + ": 洁净数据匹配委托操作");
+        grossrow.setUpdateManNo(userId);
+        meterWorkHookActFirstMapper.updateByPrimaryKey(grossrow);
+
+        // 皮重
+        MeterWorkHookActFirst tarerow = meterWorkHookActFirstMapper.selectAndMatch(queryrow.getActualFirst2No(), predictionNo);
+        tarerow.setUpdateTime(new Date());
+        tarerow.setUpdateManName(userName + ": 洁净数据匹配委托操作");
+        tarerow.setUpdateManNo(userId);
+        meterWorkHookActFirstMapper.updateByPrimaryKey(tarerow);
+
+        // 处理预报
+        if (StringUtils.isNotEmpty(predictionNo)) {
+            PreHookScale scale = new PreHookScale();
+            scale.setPredictionNo(predictionNo);
+            scale.setValueFlag("2");
+            scale.setUpdateTime(new Date());
+            scale.setUpdateManNo("system");
+            scale.setUpdateManName("计量洁净数据匹配委托操作");
+            preHookScaleMapper.updateByPrimaryKeySelective(scale);
+        }
+
+        MeterWorkHookActual mwca = meterWorkHookActualMapper.matchPredcition(actualNo, predictionNo);
+        mwca.setValueFlag("1");
+//        mwca.setNote(note); 添加修改原因记录
+        meterWorkHookActualMapper.updateByPrimaryKey(mwca);
+        return mwca;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public MeterWorkHookActual cleanPrediction (MeterWorkHookActual model) throws MarkerMetException {
+        if (model.getActualNo() == null || "".equals(model.getActualNo())) {
+            throw new MarkerMetException(500, "结净数据主键不能为空");
+        }
+        if (!model.getValueFlag().equals("1") && model.getPredictionNo() != null && !"".equals(model.getPredictionNo())) {
+            throw new MarkerMetException(500, "只有有效已匹配的结净数据才能进行解除操作");
+        }
+        MeterWorkHookActual mwcaquery = meterWorkHookActualMapper.selectByPrimaryKey(model.getActualNo());
+        if (mwcaquery == null) {
+            throw new MarkerMetException(500, "不存在对应的结净数据");
+        }
+        UserPayload payload = UserPayload.getCurrUser();
+        String userId = payload.getId();
+        String userName = payload.getUserName();
+
+        // 处理一次计量数据
+        // 毛重
+        MeterWorkHookActFirst grossrow = meterWorkHookActFirstMapper.selectAndRemove(model.getActualFirst1No());
+        grossrow.setValueFlag("3");
+        grossrow.setUpdateTime(new Date());
+        grossrow.setUpdateManName(userName + ": 结净数据解除委托操作");
+        grossrow.setUpdateManNo(userId);
+        meterWorkHookActFirstMapper.updateByPrimaryKey(grossrow);
+
+        // 皮重
+        MeterWorkHookActFirst tarerow = meterWorkHookActFirstMapper.selectAndRemove(model.getActualFirst2No());
+        tarerow.setValueFlag("3");
+        tarerow.setUpdateTime(new Date());
+        tarerow.setUpdateManName(userName + ": 洁净数据解除委托操作");
+        tarerow.setUpdateManNo(userId);
+        meterWorkHookActFirstMapper.updateByPrimaryKey(tarerow);
+
+        // 处理预报
+        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+            PreHookScale scale = new PreHookScale();
+            scale.setPredictionNo(model.getPredictionNo());
+            scale.setValueFlag("1");
+            scale.setUpdateTime(new Date());
+            scale.setUpdateManNo("system");
+            scale.setUpdateManName("计量洁净数据解除委托操作");
+            preHookScaleMapper.updateByPrimaryKeySelective(scale);
+        }
+        MeterWorkHookActual mwca = meterWorkHookActualMapper.cleanPredcition(model.getActualNo());
+
+        mwca.setUpdateManNo(userId);
+        mwca.setUpdateManName(userName);
+        mwca.setUpdateTime(new Date());
+        mwca.setValueFlag("0");
+        meterWorkHookActualMapper.updateByPrimaryKey(mwca);
+        return mwca;
+    }
 }

+ 36 - 0
src/main/java/com/steerinfo/pretrack/prehookscale/controller/PreHookScaleController.java

@@ -4,8 +4,10 @@ import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.meterwork.except.MarkerMetException;
 import com.steerinfo.pretrack.prehookscale.model.PreHookScale;
 import com.steerinfo.pretrack.prehookscale.service.IPreHookScaleService;
+import com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
@@ -107,4 +109,38 @@ public class PreHookScaleController extends BaseRESTfulController {
     	}
       return success();
     }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("prehookscale:view")
+    @GetMapping(value = "/listLikeRailwayNo/")
+    public RESTfulResult listLikeRailwayNo(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<PreHookScale> list = preHookScaleService.queryLikeForRailwayNo(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value = "获取预报信息", notes = "根据车号获取预报信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", dataType = "Integer")
+    })
+    @GetMapping(value = "/select")
+    public RESTfulResult selectlist(@RequestParam String railwayNo, Integer pageNum, Integer pageSize) {
+        RESTfulResult rm = failed();
+        try {
+            PageList<PreHookScale> pageInfo = preHookScaleService.selectlist(railwayNo, pageNum, pageSize);
+            return success(pageInfo);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        }
+        return rm;
+    }
+
 }

+ 5 - 0
src/main/java/com/steerinfo/pretrack/prehookscale/mapper/PreHookScaleMapper.java

@@ -3,8 +3,13 @@ package com.steerinfo.pretrack.prehookscale.mapper;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.pretrack.prehookscale.model.PreHookScale;
 import java.math.*;
+import java.util.List;
+
 import org.apache.ibatis.annotations.Mapper;
 
 @Mapper
 public interface PreHookScaleMapper extends IBaseMapper<PreHookScale, String> {
+    List<PreHookScale> selectlist(String railwayNo);
+
+    List<PreHookScale> selectLikeByRailwayNo(String railwayNo, String valueFlag);
 }

+ 41 - 1
src/main/java/com/steerinfo/pretrack/prehookscale/mapper/PreHookScaleMapper.xml

@@ -1503,5 +1503,45 @@
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  
+  <select id="selectlist" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where RAILWAY_NO=#{railwayNo,jdbcType=VARCHAR} and  value_flag in('1','4')
+    order by create_time desc
+  </select>
+
+  <select id="doQueryByRailwayNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <where>
+      VALUE_FLAG in ('1','4')
+      <if test="railwayNo != null">
+        and RAILWAY_NO = #{railwayNo}
+      </if>
+      <if test="railwayTypeNo != null">
+        and RAILWAY_TYPE_NO = #{railwayTypeNo}
+      </if>
+      <if test="railwayTypeName != null">
+        and RAILWAY_TYPE_NAME = #{railwayTypeName}
+      </if>
+      <if test="memo != null">
+        and memo = #{memo}
+      </if>
+      <if test="startTime != null and startTime!='' and endTime != null and endTime!=''">
+        and create_time between to_date(#{startTime},'yyyy-MM-dd HH24:mi:ss') and to_date(#{endTime},'yyyy-MM-dd HH24:mi:ss')
+      </if>
+    </where>
+    order by CREATE_TIME desc
+  </select>
+
+  <select id="selectLikeByRailwayNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <where>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG = #{valueFlag}
+      </if>
+      <if test="railwayNo != null and railwayNo != ''">
+        and RAILWAY_NO LIKE '%${railwayNo}'
+      </if>
+    </where>
+    order by CREATE_TIME desc
+  </select>
 </mapper>

+ 9 - 0
src/main/java/com/steerinfo/pretrack/prehookscale/service/IPreHookScaleService.java

@@ -1,9 +1,15 @@
 package com.steerinfo.pretrack.prehookscale.service;
 
 import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.pretrack.prehookscale.model.PreHookScale;
+import com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale;
+
 import java.util.Date;
 import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * PreHookScale服务接口:
@@ -20,4 +26,7 @@ import java.math.BigDecimal;
  */
 public interface IPreHookScaleService extends IBaseService<PreHookScale, String>{
 
+    PageList<PreHookScale> selectlist(String railwayNo, Integer pageNum, Integer pageSize);
+
+    PageList<PreHookScale> queryLikeForRailwayNo(Map<String, Object> var1, Integer var2, Integer var3);
 }

+ 30 - 0
src/main/java/com/steerinfo/pretrack/prehookscale/service/impl/PreHookScaleServiceImpl.java

@@ -2,13 +2,22 @@ package com.steerinfo.pretrack.prehookscale.service.impl;
 
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.meterwork.except.MarkerMetException;
 import com.steerinfo.pretrack.prehookscale.model.PreHookScale;
 import com.steerinfo.pretrack.prehookscale.mapper.PreHookScaleMapper;
 import com.steerinfo.pretrack.prehookscale.service.IPreHookScaleService;
+import com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
 import java.util.Date;
 import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * PreHookScale服务实现:
@@ -33,4 +42,25 @@ public class PreHookScaleServiceImpl extends BaseServiceImpl<PreHookScale, Strin
     protected IBaseMapper<PreHookScale, String> getMapper() {
         return preHookScaleMapper;
     }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public PageList<PreHookScale> selectlist(String railwayNo, Integer pageNum, Integer pageSize) {
+        if (railwayNo == null && "".equals(railwayNo)) {
+            throw new MarkerMetException(500, "车号为空!!");
+        }
+        PageHelper.startPage(pageNum, pageSize);
+        List<PreHookScale> list = preHookScaleMapper.selectlist(railwayNo);
+        PageList pageInfo = new PageList(list);
+        return pageInfo;
+    }
+
+    public PageList<PreHookScale> queryLikeForRailwayNo(Map<String, Object> parameters, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        String railwayNo = (String) parameters.get("railwayNo");
+        String valueFlag = (String) parameters.get("valueFlag");
+        List<PreHookScale> list = preHookScaleMapper.selectLikeByRailwayNo(railwayNo,valueFlag);
+        PageList pageInfo = new PageList(list);
+        return pageInfo;
+    }
 }