qzyReal 3 лет назад
Родитель
Сommit
15813a9d2c

+ 3 - 0
app/apis/api.js

@@ -114,5 +114,8 @@ export default {
 	},
 	getPartCarByChannel(data){
 		return ajax.get('/api/getPartCarByChannel',data)
+	},
+	addDeclare(data){
+		return ajax.postJson('/api/addDeclare',data)
 	}
 }

+ 14 - 0
app/pages.json

@@ -157,6 +157,20 @@
 
 		},
 		{
+			"path": "pages/declare/add",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		
+		},
+		{
+			"path": "pages/declare/addDeclareSuccess",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		
+		},
+		{
 			"path": "pages/business-entering/item-select",
 			"style": {
 				"navigationBarTitleText": "选择项目",

+ 10 - 1
sp-admin/sa-frame/menu-list.js

@@ -121,5 +121,14 @@ var menuList =	[
 			{id: 'tb-pay-record-list', name: '支付记录', url: 'sa-view/tb-pay-record/tb-pay-record-list.html'},
 		]
 	},
-
+	{
+		id: 'tb-disinfect',
+		name: '消毒申请单',
+		icon: 'el-icon-folder-opened',
+		info: '消毒申请单表数据的维护',
+		childList: [
+			{id: 'tb-disinfect-list', name: '消毒申请单-列表', url: 'sa-view/tb-disinfect/tb-disinfect-list.html'},
+			{id: 'tb-disinfect-add', name: '消毒申请单-添加', url: 'sa-view/tb-disinfect/tb-disinfect-add.html'},
+		]
+	},
 ]

+ 43 - 22
sp-admin/sa-view/tb-business/tb-business-add.html

@@ -71,8 +71,8 @@
 											</el-select>
 										</div>
 										<div class="c-item">
-											<label class="c-label">申报单:</label>
-											<el-input v-model="m.declareNo" placeholder="选择申报单">
+											<label class="c-label">申报单:</label>
+											<el-input v-model="m.declareNo" placeholder="选择申报单" readonly>
 												<div slot="suffix" style="cursor: pointer;color: blue;"
 													@click="handlerDeclare">
 													<i class="el-icon-folder-add"></i>
@@ -269,11 +269,8 @@
 			</el-dialog>
 			<el-dialog title="申报单" :visible.sync="declare.visible" width="90%">
 				<div class="delect-search">
-					产品:
-					<el-input style="width: 140px;" v-model="car.form.driverPhone" placeholder="产品">
-					</el-input>
-					批号:
-					<el-input style="width: 140px;" v-model="car.form.driverPhone" placeholder="批号">
+					申报人:
+					<el-input style="width: 140px;" v-model="declare.p.declarePeople" placeholder="申报人">
 					</el-input>
 					<el-button type="primary" @click="getDeclareList">搜索</el-button>
 					<el-button type="info" @click="resetDclare">重置</el-button>
@@ -285,15 +282,19 @@
 					<el-table :data="declare.list" ref="declareTable">
 						<el-table-column type="selection">
 						</el-table-column>
-						<el-table-column prop="goodsName" label="产品学名">
+						<el-table-column prop="declarePeople" label="申报人">
 						</el-table-column>
-						<el-table-column prop="productionNo" label="生产批号">
+						<el-table-column prop="declarePhone"  label="申报电话">
 						</el-table-column>
-						<el-table-column prop="grossWeight" label="毛重">
+						<el-table-column prop="declareNo" width="180" label="申报单号">
+						</el-table-column>
+						<el-table-column prop="goodsName" label="产品学名">
 						</el-table-column>
-						<el-table-column prop="num" label="件数">
+						<el-table-column prop="carNo" label="越南车牌">
 						</el-table-column>
-						<el-table-column prop="carSize" label="货主单位">
+						<el-table-column prop="grossWeight" label="毛重(吨)">
+						</el-table-column>
+						<el-table-column prop="createTime" width="140" label="申报时间">
 						</el-table-column>
 					</el-table>
 					<div class="block">
@@ -386,7 +387,7 @@
 							pageNo: 1,
 							pageSize: 8,
 							dataCount: 0,
-							declareNo: '',
+							declarePeople: '',
 							production: ''
 						}
 					}
@@ -415,7 +416,7 @@
 						this.declare.p = {
 							pageNo: 1,
 							pageSize: 8,
-							declareNo: '',
+							declarePeople: '',
 							production: ''
 						}
 						this.getDeclareList();
@@ -425,16 +426,19 @@
 						this.getDeclareList();
 					},
 					getDeclareList() {
-						sa.ajax('/tbDeClare/getList', sa.removeNull(this.declare.p), function(resp) {
+						sa.ajax('/TbDeclare/getNotBindList', sa.removeNull(this.declare.p), function(resp) {
 							let list = resp.data;
-							list.forEach(row => {
-								if (row.productionNo == this.m.declareNo) {
-									this.$refs.declareTable.toggleRowSelection(row, true)
-								}
-							})
 							this.declare.list = list;
 							this.declare.p.pageNo = resp.pageNo;
 							this.declare.p.dataCount = resp.dataCount;
+							list.forEach(row => {
+								if (row.declareNo == this.m.declareNo) {
+									console.log(row);
+									this.$nextTick(() => {
+										this.$refs['declareTable'].toggleRowSelection(row, true)
+									})
+								}
+							})
 						}.bind(this))
 					},
 					confirmSelectDeclare() {
@@ -447,7 +451,24 @@
 						if (selection.length > 1) {
 							return sa.msg('只能选择一条数据')
 						}
-						this.m.declareNo = declareNo;
+						let declare = selection[0];
+						if (this.m.declareNo !== declare.declareNo) {
+							this.m.declareNo = declare.declareNo;
+							this.m.cardNo = declare.carNo;
+							this.m.chinaCarNo = declare.chinaCarNo;
+							this.m.netWeight = declare.grossWeight;
+							let chinaCarNo = declare.chinaCarNo;
+							if (chinaCarNo) {
+								let list = [];
+								chinaCarNo.replace(",", ",").split(",").forEach(carNo => {
+									let obj = {
+										carNo: carNo
+									}
+									list.push(obj);
+									this.china.list = list;
+								})
+							}
+						}
 						this.declare.visible = false;
 					},
 					findInAndNoBusinessCar() {
@@ -691,7 +712,7 @@
 						}
 						sa.checkNull(m.goodsName, '请选择运输货物');
 						sa.checkNull(m.cardNo, '请输入 [车牌号]');
-						if (!sa.isNum(m.cardSize)) {
+						if (!m.cardSize||!sa.isNum(m.cardSize)) {
 							sa.error('车辆规格只能输入数字')
 							return;
 						}

+ 50 - 30
sp-admin/sa-view/tb-business/tb-business-edit.html

@@ -272,11 +272,8 @@
 			</el-dialog>
 			<el-dialog title="申报单" :visible.sync="declare.visible" width="90%">
 				<div class="delect-search">
-					产品:
-					<el-input style="width: 140px;" v-model="car.form.driverPhone" placeholder="产品">
-					</el-input>
-					批号:
-					<el-input style="width: 140px;" v-model="car.form.driverPhone" placeholder="批号">
+					申报人:
+					<el-input style="width: 140px;" v-model="declare.p.delcarePeople" placeholder="申报人">
 					</el-input>
 					<el-button type="primary" @click="getDeclareList">搜索</el-button>
 					<el-button type="info" @click="resetDclare">重置</el-button>
@@ -288,15 +285,19 @@
 					<el-table :data="declare.list" ref="declareTable">
 						<el-table-column type="selection">
 						</el-table-column>
-						<el-table-column prop="goodsName" label="产品学名">
+						<el-table-column prop="declarePeople" label="申报人">
+						</el-table-column>
+						<el-table-column prop="declarePhone" label="申报电话">
+						</el-table-column>
+						<el-table-column prop="declareNo" width="180" label="申报单号">
 						</el-table-column>
-						<el-table-column prop="productionNo" label="生产批号">
+						<el-table-column prop="goodsName" label="产品学名">
 						</el-table-column>
-						<el-table-column prop="grossWeight" label="毛重">
+						<el-table-column prop="carNo" label="越南车牌">
 						</el-table-column>
-						<el-table-column prop="num" label="件数">
+						<el-table-column prop="grossWeight" label="毛重(吨)">
 						</el-table-column>
-						<el-table-column prop="carSize" label="货主单位">
+						<el-table-column prop="createTime" width="140" label="申报时间">
 						</el-table-column>
 					</el-table>
 					<div class="block">
@@ -390,7 +391,7 @@
 							pageNo: 1,
 							pageSize: 8,
 							dataCount: 0,
-							declareNo: '',
+							delcarePeople: '',
 							production: ''
 						}
 					}
@@ -419,7 +420,7 @@
 						this.declare.p = {
 							pageNo: 1,
 							pageSize: 8,
-							declareNo: '',
+							declarePeople: '',
 							production: ''
 						}
 						this.getDeclareList();
@@ -429,16 +430,16 @@
 						this.getDeclareList();
 					},
 					getDeclareList() {
-						sa.ajax('/tbDeClare/getList', sa.removeNull(this.declare.p), function(resp) {
+						sa.ajax('/TbDeclare/getNotBindList', sa.removeNull(this.declare.p), function(resp) {
 							let list = resp.data;
+							this.declare.list = list;
+							this.declare.p.pageNo = resp.pageNo;
+							this.declare.p.dataCount = resp.dataCount;
 							list.forEach(row => {
-								if (row.productionNo == this.m.declareNo) {
+								if (row.declareNo == this.m.declareNo) {
 									this.$refs.declareTable.toggleRowSelection(row, true)
 								}
 							})
-							this.declare.list = list;
-							this.declare.p.pageNo = resp.pageNo;
-							this.declare.p.dataCount = resp.dataCount;
 						}.bind(this))
 					},
 					confirmSelectDeclare() {
@@ -451,28 +452,47 @@
 						if (selection.length > 1) {
 							return sa.msg('只能选择一条数据')
 						}
-						this.m.declareNo = declareNo;
+
+						let declare = selection[0];
+						if (this.m.declareNo !== declare.declareNo) {
+							this.m.declareNo = declare.declareNo;
+							this.m.cardNo = declare.carNo;
+							this.m.chinaCarNo = declare.chinaCarNo;
+							this.m.netWeight = declare.grossWeight;
+							let chinaCarNo = declare.chinaCarNo;
+							if (chinaCarNo) {
+								let list = [];
+								chinaCarNo.replace(",", ",").split(",").forEach(carNo => {
+									let obj = {
+										carNo: carNo
+									}
+									list.push(obj);
+									this.china.list = list;
+								})
+							}
+						}
 						this.declare.visible = false;
 					},
-					findInAndNoBusinessCar(){
-						sa.ajax('/TbBusinessCar/findInAndNoBusinessCar',function(resp){
-							this.carList=resp.data;
+					findInAndNoBusinessCar() {
+						sa.ajax('/TbBusinessCar/findInAndNoBusinessCar', function(resp) {
+							this.carList = resp.data;
 						}.bind(this))
 					},
-					handleSelectCar(data){
-						this.m.cardNo=data.carNo;
+					handleSelectCar(data) {
+						this.m.cardNo = data.carNo;
 					},
-					queryCarAsync(queryStr,cb){
+					queryCarAsync(queryStr, cb) {
 						let list = this.carList;
 						let filterList = list.filter(obj => obj.carNo.indexOf(queryStr) !== -1);
 						cb(filterList)
 					},
-					handleSelectChinaCar(data){
-						this.car.form.carNo=data.carNo;
+					handleSelectChinaCar(data) {
+						this.car.form.carNo = data.carNo;
 					},
-					queryChinaCarAsync(queryStr,cb){
+					queryChinaCarAsync(queryStr, cb) {
 						let list = this.carList;
-						let filterList = list.filter(obj => obj.carNo.indexOf(queryStr) !== -1&&obj.carNo!==this.m.cardNo);
+						let filterList = list.filter(obj => obj.carNo.indexOf(queryStr) !== -1 && obj.carNo !== this.m
+							.cardNo);
 						cb(filterList)
 					},
 					cleanItem(type) {
@@ -650,7 +670,7 @@
 							sa.ajax('/TbBusiness/getById?id=' + this.id, function(res) {
 								let m = res.data;
 								let items = m.items;
-								this.china.list = m.cars.filter(obj=>obj.carNo!==m.cardNo);
+								this.china.list = m.cars.filter(obj => obj.carNo !== m.cardNo);
 								let hsItem = items.filter(obj => obj.itemTypeName.indexOf('人') !== -1 &&
 									obj.itemTypeName.indexOf('核酸') !== -1);
 								if (hsItem.length > 0) {
@@ -720,7 +740,7 @@
 						}
 						sa.checkNull(m.goodsName, '请选择运输货物');
 						sa.checkNull(m.cardNo, '请输入 [车牌号]');
-						if (!sa.isNum(m.cardSize)) {
+						if (!!m.cardSize || !sa.isNum(m.cardSize)) {
 							sa.error('车辆规格只能输入数字')
 							return;
 						}

+ 1 - 1
sp-server/app.pid

@@ -1 +1 @@
-19168
+21788

+ 6 - 0
sp-server/src/main/java/com/pj/api/h5/ApiController.java

@@ -12,6 +12,7 @@ import com.pj.project.tb_business_car.TbBusinessCar;
 import com.pj.project.tb_business_car.TbBusinessCarService;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.project.tb_costomer.TbCostomerService;
+import com.pj.project.tb_declare.TbDeclare;
 import com.pj.project4sp.admin4login.SpAccAdminService;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.sg.NbUtil;
@@ -104,5 +105,10 @@ public class ApiController {
     public AjaxJson getPartCarByChannel(String channel){
         return AjaxJson.getSuccessData(apiService.getPartCarByChannel(channel));
     }
+    @PostMapping(value = "addDeclare")
+    public AjaxJson addDeclare(@RequestBody TbDeclare tbDeclare){
+        apiService.addDeclare(tbDeclare);
+        return AjaxJson.getSuccess();
+    }
 
 }

+ 31 - 7
sp-server/src/main/java/com/pj/api/service/ApiService.java

@@ -1,6 +1,7 @@
 package com.pj.api.service;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.StrUtil;
 import com.pj.api.bo.InOutRecordBO;
 import com.pj.project.tb_business.TbBusiness;
@@ -9,6 +10,8 @@ import com.pj.project.tb_business_car.TbBusinessCar;
 import com.pj.project.tb_business_car.TbBusinessCarService;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.project.tb_costomer.TbCostomerService;
+import com.pj.project.tb_declare.TbDeclare;
+import com.pj.project.tb_declare.TbDeclareService;
 import com.pj.project.tb_pass_record.TbPassRecord;
 import com.pj.project.tb_pass_record.TbPassRecordService;
 import com.pj.utils.cache.RedisUtil;
@@ -20,6 +23,8 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.*;
 
 /**
@@ -41,6 +46,8 @@ public class ApiService {
     @Resource
     @Lazy
     TbBusinessCarService tbBusinessCarService;
+    @Resource
+    private TbDeclareService tbDeclareService;
 
     public List<InOutRecordBO> getInOutRecord(SoMap so) {
         List<TbPassRecord> passRecords = tbPassRecordService.getList(so);
@@ -84,18 +91,35 @@ public class ApiService {
         Map<String, Object> result = new HashMap<>();
         String carNo = RedisUtil.get(channel);
         TbBusinessCar tbBusinessCar = tbBusinessCarService.findInBuNoOutAndNotPay(carNo);
-        if (tbBusinessCar==null) {
+        if (tbBusinessCar == null) {
             return result;
         }
-        Date now=new Date();
+        Date now = new Date();
         BigDecimal price = tbBusinessService.calculationPartMoney(tbBusinessCar.getRealInTime(), now, tbBusinessCar.getCarSize());
         BigDecimal dif = price.subtract(tbBusinessCar.getMoney());
         Map<String, Object> car = new HashMap<>();
-        car.put("id",tbBusinessCar.getId());
-        car.put("carNo",tbBusinessCar.getCarNo());
-        car.put("price",dif);
-        result.put("total",dif);
-        result.put("cars",Collections.singleton(car));
+        car.put("id", tbBusinessCar.getId());
+        car.put("carNo", tbBusinessCar.getCarNo());
+        car.put("price", dif);
+        result.put("total", dif);
+        result.put("cars", Collections.singleton(car));
         return result;
     }
+
+    public void addDeclare(TbDeclare tbDeclare) {
+        String productionCode = tbDeclare.getProductionCode();
+        Date now=new Date();
+        if (StrUtil.isNotEmpty(productionCode)) {
+            TbDeclare db = tbDeclareService.findByProductionCode(productionCode);
+            if (db!=null){
+                BeanUtil.copyProperties(tbDeclare,db,"id");
+                db.setCreateTime(now);
+                tbDeclareService.updateById(db);
+                return;
+            }
+        }
+        String nowStr = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
+        tbDeclare.setCreateTime(new Date()).setDeclareNo(nowStr + RandomUtil.randomNumbers(6));
+        tbDeclareService.save(tbDeclare);
+    }
 }

+ 30 - 11
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -33,6 +33,8 @@ import com.pj.project.tb_car.TbCar;
 import com.pj.project.tb_car.TbCarService;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.project.tb_costomer.TbCostomerService;
+import com.pj.project.tb_declare.TbDeclare;
+import com.pj.project.tb_declare.TbDeclareService;
 import com.pj.project.tb_driver.TbDriver;
 import com.pj.project.tb_driver.TbDriverService;
 import com.pj.project.tb_item.TbItem;
@@ -53,6 +55,7 @@ import org.aspectj.weaver.loadtime.Aj;
 import org.omg.CORBA.OBJ_ADAPTER;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 
@@ -101,6 +104,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
     private TbNoticesService tbNoticesService;
     @Resource
     TbBusinessCarService tbBusinessCarService;
+    @Resource
+    @Lazy
+    TbDeclareService tbDeclareService;
 
 
     public TbBusiness checkCarNo(String carNo) {
@@ -114,7 +120,17 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
      * 增
      */
     public AjaxJson addOrUpdate(TbBusiness t) {
-        double carSize = t.getCardSize();
+        if (StrUtil.isNotEmpty(t.getId()) && StrUtil.isNotEmpty(t.getDeclareNo())) {
+            TbBusiness db = this.getById(t.getId());
+            if (!StrUtil.equals(db.getDeclareNo(), t.getDeclareNo())) {
+                TbDeclare tbDeclare = tbDeclareService.findByDeclareNo(db.getDeclareNo());
+                if (tbDeclare != null) {
+                    tbDeclare.setBusinessId("");
+                    tbDeclareService.updateById(tbDeclare);
+                }
+            }
+        }
+        Double carSize = t.getCardSize();
         if (carSize > carConfig.getMaxLength()) {
             return AjaxJson.getError("车辆规格不能大于" + carConfig.getMaxLength());
         }
@@ -155,8 +171,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     .setUnit(tbItem.getUnit()).setTotal(NumberUtil.mul(num, tbItem.getPrice()));
         }
         List<TbBusinessCar> carList = JSONUtil.toList(t.getCarJson(), TbBusinessCar.class);
-        String chinaCarNo=carList.stream().map(TbBusinessCar::getCarNo).collect(Collectors.joining("、"));
-        t.setChinaCarNo(StrUtil.isNotEmpty(chinaCarNo)?chinaCarNo.toUpperCase():"");
+        String chinaCarNo = carList.stream().map(TbBusinessCar::getCarNo).collect(Collectors.joining("、"));
+        t.setChinaCarNo(StrUtil.isNotEmpty(chinaCarNo) ? chinaCarNo.toUpperCase() : "");
         carList.forEach(tbBusinessCar -> {
             String carNo = tbBusinessCar.getCarNo().toUpperCase();
             TbBusinessCar db = tbBusinessCarService.findByBusinessIdAndCarNo(t.getId(), carNo);
@@ -186,8 +202,11 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 .setPartMoney(initCarPartMoney);
         this.saveOrUpdate(t);
         tbBusinessItemService.saveBatch(items);
-
-
+        if (StrUtil.isNotEmpty(t.getDeclareNo())) {
+            TbDeclare tbDeclare = tbDeclareService.findByDeclareNo(t.getDeclareNo());
+            tbDeclare.setBusinessId(t.getId());
+            tbDeclareService.updateById(tbDeclare);
+        }
         return AjaxJson.getSuccess();
     }
 
@@ -407,14 +426,14 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         cars.forEach(tbBusinessCar -> {
             double partMoney = tbBusinessCar.getBasePartMoney().doubleValue();
             if (!StrUtil.equals("STATE", state)) {
-                Date inTime=tbBusinessCar.getRealInTime();
-                if (inTime!=null){
+                Date inTime = tbBusinessCar.getRealInTime();
+                if (inTime != null) {
                     BigDecimal price = this.calculationPartMoney(inTime, now, tbBusinessCar.getCarSize());
-                    BigDecimal money=tbBusinessCar.getMoney();
+                    BigDecimal money = tbBusinessCar.getMoney();
                     BigDecimal basePrice = tbBusinessCar.getBasePartMoney();
-                    partMoney =money==null? price.subtract(basePrice).doubleValue():price.subtract(money).doubleValue();
-                }else {
-                    partMoney=0D;
+                    partMoney = money == null ? price.subtract(basePrice).doubleValue() : price.subtract(money).doubleValue();
+                } else {
+                    partMoney = 0D;
                 }
             }
             if (partMoney > 0) {

+ 10 - 1
sp-server/src/main/java/com/pj/project/tb_declare/TbDeclare.java

@@ -1,6 +1,7 @@
 package com.pj.project.tb_declare;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -43,6 +44,10 @@ public class TbDeclare implements Serializable {
 	 */
 	public String businessId;
 
+	public String declarePeople;
+
+	public String declarePhone;
+
 	/**
 	 * 产品学名 
 	 */
@@ -156,7 +161,11 @@ public class TbDeclare implements Serializable {
 	/**
 	 * 柜号 
 	 */
-	public String containerCode;	
+	public String containerCode;
+
+	private Date createTime;
+
+	private String declareNo;
 
 
 

+ 8 - 0
sp-server/src/main/java/com/pj/project/tb_declare/TbDeclareController.java

@@ -75,6 +75,14 @@ public class TbDeclareController {
 		List<TbDeclare> list = tbDeclareService.getList(so.startPage());
 		return AjaxJson.getPageData(so.getDataCount(), list);
 	}
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
+	@RequestMapping("getNotBindList")
+	public AjaxJson getNotBindList() {
+		SoMap so = SoMap.getRequestSoMap();
+		so.put("bind",1);
+		List<TbDeclare> list = tbDeclareService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
 	
 	
 	

+ 110 - 116
sp-server/src/main/java/com/pj/project/tb_declare/TbDeclareMapper.xml

@@ -2,21 +2,21 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.pj.project.tb_declare.TbDeclareMapper">
 
-	<!-- 增 [G] -->
-	<insert id="add">
+    <!-- 增 [G] -->
+    <insert id="add">
 		insert into 
 		tb_declare (id, business_id, goods_name, gross_weight, num, production_date, expiration_date, storage_mode, production_mode, origin, producer_code, send_unit, receive_unit, route, driver_name, driver_phone, agent, agent_phone, china_car_no, car_no, custom_proof, quarantine_proof, shop, production_code, container_code) 
 		values (#{id}, #{businessId}, #{goodsName}, #{grossWeight}, #{num}, #{productionDate}, #{expirationDate}, #{storageMode}, #{productionMode}, #{origin}, #{producerCode}, #{sendUnit}, #{receiveUnit}, #{route}, #{driverName}, #{driverPhone}, #{agent}, #{agentPhone}, #{chinaCarNo}, #{carNo}, #{customProof}, #{quarantineProof}, #{shop}, #{productionCode}, #{containerCode}) 
 	</insert>
 
-	<!-- 删 -->
-	<delete id="delete">
+    <!-- 删 -->
+    <delete id="delete">
 		delete from tb_declare 
 		where id = #{id}
 	</delete>
 
-	<!-- 改 [G] -->
-	<update id="update">
+    <!-- 改 [G] -->
+    <update id="update">
 		update tb_declare set
 		id = #{id}, 
 		business_id = #{businessId}, 
@@ -47,118 +47,112 @@
 	</update>
 
 
-	<!-- ================================== 查询相关 ================================== -->
-	<!-- select id, business_id, goods_name, gross_weight, num, production_date, expiration_date, storage_mode, production_mode, origin, producer_code, send_unit, receive_unit, route, driver_name, driver_phone, agent, agent_phone, china_car_no, car_no, custom_proof, quarantine_proof, shop, production_code, container_code from tb_declare  -->
-	
-	<!-- 通用映射:手动模式 -->
-	<resultMap id="model" type="com.pj.project.tb_declare.TbDeclare">
-		<result property="id" column="id" />
-		<result property="businessId" column="business_id" />
-		<result property="goodsName" column="goods_name" />
-		<result property="grossWeight" column="gross_weight" />
-		<result property="num" column="num" />
-		<result property="productionDate" column="production_date" />
-		<result property="expirationDate" column="expiration_date" />
-		<result property="storageMode" column="storage_mode" />
-		<result property="productionMode" column="production_mode" />
-		<result property="origin" column="origin" />
-		<result property="producerCode" column="producer_code" />
-		<result property="sendUnit" column="send_unit" />
-		<result property="receiveUnit" column="receive_unit" />
-		<result property="route" column="route" />
-		<result property="driverName" column="driver_name" />
-		<result property="driverPhone" column="driver_phone" />
-		<result property="agent" column="agent" />
-		<result property="agentPhone" column="agent_phone" />
-		<result property="chinaCarNo" column="china_car_no" />
-		<result property="carNo" column="car_no" />
-		<result property="customProof" column="custom_proof" />
-		<result property="quarantineProof" column="quarantine_proof" />
-		<result property="shop" column="shop" />
-		<result property="productionCode" column="production_code" />
-		<result property="containerCode" column="container_code" />
-	</resultMap>
-	
-	<!-- 公共查询sql片段 -->
-	<sql id="select_sql">
+    <!-- ================================== 查询相关 ================================== -->
+    <!-- select id, business_id, goods_name, gross_weight, num, production_date, expiration_date, storage_mode, production_mode, origin, producer_code, send_unit, receive_unit, route, driver_name, driver_phone, agent, agent_phone, china_car_no, car_no, custom_proof, quarantine_proof, shop, production_code, container_code from tb_declare  -->
+
+    <!-- 通用映射:手动模式 -->
+    <resultMap id="model" type="com.pj.project.tb_declare.TbDeclare">
+        <result property="id" column="id"/>
+        <result property="businessId" column="business_id"/>
+        <result property="goodsName" column="goods_name"/>
+        <result property="grossWeight" column="gross_weight"/>
+        <result property="num" column="num"/>
+        <result property="productionDate" column="production_date"/>
+        <result property="expirationDate" column="expiration_date"/>
+        <result property="storageMode" column="storage_mode"/>
+        <result property="productionMode" column="production_mode"/>
+        <result property="origin" column="origin"/>
+        <result property="producerCode" column="producer_code"/>
+        <result property="sendUnit" column="send_unit"/>
+        <result property="receiveUnit" column="receive_unit"/>
+        <result property="route" column="route"/>
+        <result property="driverName" column="driver_name"/>
+        <result property="driverPhone" column="driver_phone"/>
+        <result property="agent" column="agent"/>
+        <result property="agentPhone" column="agent_phone"/>
+        <result property="chinaCarNo" column="china_car_no"/>
+        <result property="carNo" column="car_no"/>
+        <result property="customProof" column="custom_proof"/>
+        <result property="quarantineProof" column="quarantine_proof"/>
+        <result property="shop" column="shop"/>
+        <result property="productionCode" column="production_code"/>
+        <result property="containerCode" column="container_code"/>
+    </resultMap>
+
+    <!-- 公共查询sql片段 -->
+    <sql id="select_sql">
 		select * 
 		from tb_declare 
 	</sql>
-	
-	<!-- 查 - 根据id -->
-	<select id="getById" resultMap="model">
-		<include refid="select_sql"></include>
-		where id = #{id}
-	</select>
-	
-	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
-	<select id="getList" resultMap="model">
-		<include refid="select_sql"></include>
-		<where>
-			<if test=' this.has("id") '> and id = #{id} </if>
-			<if test=' this.has("businessId") '> and business_id = #{businessId} </if>
-			<if test=' this.has("goodsName") '> and goods_name = #{goodsName} </if>
-			<if test=' this.has("grossWeight") '> and gross_weight = #{grossWeight} </if>
-			<if test=' this.has("num") '> and num = #{num} </if>
-			<if test=' this.has("productionDate") '> and production_date = #{productionDate} </if>
-			<if test=' this.has("expirationDate") '> and expiration_date = #{expirationDate} </if>
-			<if test=' this.has("storageMode") '> and storage_mode = #{storageMode} </if>
-			<if test=' this.has("productionMode") '> and production_mode = #{productionMode} </if>
-			<if test=' this.has("origin") '> and origin = #{origin} </if>
-			<if test=' this.has("producerCode") '> and producer_code = #{producerCode} </if>
-			<if test=' this.has("sendUnit") '> and send_unit = #{sendUnit} </if>
-			<if test=' this.has("receiveUnit") '> and receive_unit = #{receiveUnit} </if>
-			<if test=' this.has("route") '> and route = #{route} </if>
-			<if test=' this.has("driverName") '> and driver_name = #{driverName} </if>
-			<if test=' this.has("driverPhone") '> and driver_phone = #{driverPhone} </if>
-			<if test=' this.has("agent") '> and agent = #{agent} </if>
-			<if test=' this.has("agentPhone") '> and agent_phone = #{agentPhone} </if>
-			<if test=' this.has("chinaCarNo") '> and china_car_no = #{chinaCarNo} </if>
-			<if test=' this.has("carNo") '> and car_no = #{carNo} </if>
-			<if test=' this.has("customProof") '> and custom_proof = #{customProof} </if>
-			<if test=' this.has("quarantineProof") '> and quarantine_proof = #{quarantineProof} </if>
-			<if test=' this.has("shop") '> and shop = #{shop} </if>
-			<if test=' this.has("productionCode") '> and production_code = #{productionCode} </if>
-			<if test=' this.has("containerCode") '> and container_code = #{containerCode} </if>
-		</where>
-		order by
-		<choose>
-			<when test='sortType == 1'> id desc </when>
-			<when test='sortType == 2'> business_id desc </when>
-			<when test='sortType == 3'> goods_name desc </when>
-			<when test='sortType == 4'> gross_weight desc </when>
-			<when test='sortType == 5'> num desc </when>
-			<when test='sortType == 6'> production_date desc </when>
-			<when test='sortType == 7'> expiration_date desc </when>
-			<when test='sortType == 8'> storage_mode desc </when>
-			<when test='sortType == 9'> production_mode desc </when>
-			<when test='sortType == 10'> origin desc </when>
-			<when test='sortType == 11'> producer_code desc </when>
-			<when test='sortType == 12'> send_unit desc </when>
-			<when test='sortType == 13'> receive_unit desc </when>
-			<when test='sortType == 14'> route desc </when>
-			<when test='sortType == 15'> driver_name desc </when>
-			<when test='sortType == 16'> driver_phone desc </when>
-			<when test='sortType == 17'> agent desc </when>
-			<when test='sortType == 18'> agent_phone desc </when>
-			<when test='sortType == 19'> china_car_no desc </when>
-			<when test='sortType == 20'> car_no desc </when>
-			<when test='sortType == 21'> custom_proof desc </when>
-			<when test='sortType == 22'> quarantine_proof desc </when>
-			<when test='sortType == 23'> shop desc </when>
-			<when test='sortType == 24'> production_code desc </when>
-			<when test='sortType == 25'> container_code desc </when>
-			<otherwise> id desc </otherwise>
-		</choose>
-	</select>
-	
-	
-	
-	
-	
-	
-	
-	
-	
+
+    <!-- 查 - 根据id -->
+    <select id="getById" resultMap="model">
+        <include refid="select_sql"></include>
+        where id = #{id}
+    </select>
+
+    <!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
+    <select id="getList" resultMap="model">
+        <include refid="select_sql"></include>
+        <where>
+            <if test=' this.has("id") '>and id = #{id}</if>
+            <if test=' this.has("businessId") '>and business_id = #{businessId}</if>
+            <if test=' this.has("declarePeople") '>and declare_people like concat('%',#{declarePeople},'%')</if>
+            <if test=' this.has("goodsName") '>and goods_name = #{goodsName}</if>
+            <if test=' this.has("grossWeight") '>and gross_weight = #{grossWeight}</if>
+            <if test=' this.has("num") '>and num = #{num}</if>
+            <if test=' this.has("productionDate") '>and production_date = #{productionDate}</if>
+            <if test=' this.has("expirationDate") '>and expiration_date = #{expirationDate}</if>
+            <if test=' this.has("storageMode") '>and storage_mode = #{storageMode}</if>
+            <if test=' this.has("productionMode") '>and production_mode = #{productionMode}</if>
+            <if test=' this.has("origin") '>and origin = #{origin}</if>
+            <if test=' this.has("producerCode") '>and producer_code = #{producerCode}</if>
+            <if test=' this.has("sendUnit") '>and send_unit = #{sendUnit}</if>
+            <if test=' this.has("receiveUnit") '>and receive_unit = #{receiveUnit}</if>
+            <if test=' this.has("route") '>and route = #{route}</if>
+            <if test=' this.has("driverName") '>and driver_name = #{driverName}</if>
+            <if test=' this.has("driverPhone") '>and driver_phone = #{driverPhone}</if>
+            <if test=' this.has("agent") '>and agent = #{agent}</if>
+            <if test=' this.has("agentPhone") '>and agent_phone = #{agentPhone}</if>
+            <if test=' this.has("chinaCarNo") '>and china_car_no = #{chinaCarNo}</if>
+            <if test=' this.has("carNo") '>and car_no = #{carNo}</if>
+            <if test=' this.has("customProof") '>and custom_proof = #{customProof}</if>
+            <if test=' this.has("quarantineProof") '>and quarantine_proof = #{quarantineProof}</if>
+            <if test=' this.has("shop") '>and shop = #{shop}</if>
+            <if test=' this.has("productionCode") '>and production_code = #{productionCode}</if>
+            <if test=' this.has("containerCode") '>and container_code = #{containerCode}</if>
+            <if test=' this.has("bind") '>and business_id is null or business_id=''</if>
+        </where>
+        order by
+        <choose>
+            <when test='sortType == 1'>id desc</when>
+            <when test='sortType == 2'>business_id desc</when>
+            <when test='sortType == 3'>goods_name desc</when>
+            <when test='sortType == 4'>gross_weight desc</when>
+            <when test='sortType == 5'>num desc</when>
+            <when test='sortType == 6'>production_date desc</when>
+            <when test='sortType == 7'>expiration_date desc</when>
+            <when test='sortType == 8'>storage_mode desc</when>
+            <when test='sortType == 9'>production_mode desc</when>
+            <when test='sortType == 10'>origin desc</when>
+            <when test='sortType == 11'>producer_code desc</when>
+            <when test='sortType == 12'>send_unit desc</when>
+            <when test='sortType == 13'>receive_unit desc</when>
+            <when test='sortType == 14'>route desc</when>
+            <when test='sortType == 15'>driver_name desc</when>
+            <when test='sortType == 16'>driver_phone desc</when>
+            <when test='sortType == 17'>agent desc</when>
+            <when test='sortType == 18'>agent_phone desc</when>
+            <when test='sortType == 19'>china_car_no desc</when>
+            <when test='sortType == 20'>car_no desc</when>
+            <when test='sortType == 21'>custom_proof desc</when>
+            <when test='sortType == 22'>quarantine_proof desc</when>
+            <when test='sortType == 23'>shop desc</when>
+            <when test='sortType == 24'>production_code desc</when>
+            <when test='sortType == 25'>container_code desc</when>
+            <otherwise>id desc</otherwise>
+        </choose>
+    </select>
+
 
 </mapper>

+ 13 - 1
sp-server/src/main/java/com/pj/project/tb_declare/TbDeclareService.java

@@ -2,6 +2,7 @@ package com.pj.project.tb_declare;
 
 import java.util.List;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.pj.utils.so.SoMap;
@@ -45,6 +46,17 @@ public class TbDeclareService extends ServiceImpl<TbDeclareMapper, TbDeclare> im
 	List<TbDeclare> getList(SoMap so) {
 		return tbDeclareMapper.getList(so);	
 	}
-	
 
+
+	public TbDeclare findByProductionCode(String productionCode) {
+		QueryWrapper<TbDeclare>ew=new QueryWrapper<>();
+		ew.eq("production_code",productionCode);
+		return getOne(ew);
+	}
+
+	public TbDeclare findByDeclareNo(String declareNo) {
+		QueryWrapper<TbDeclare>ew=new QueryWrapper<>();
+		ew.eq("declare_no",declareNo);
+		return getOne(ew);
+	}
 }

+ 173 - 0
sp-server/src/main/java/com/pj/project/tb_disinfect/TbDisinfect.java

@@ -0,0 +1,173 @@
+package com.pj.project.tb_disinfect;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.EqualsAndHashCode;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * Model: tb_disinfect -- 消毒申请单
+ * @author qzy 
+ */
+@Data
+@Accessors(chain = true)
+@TableName(TbDisinfect.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class TbDisinfect extends Model<TbDisinfect> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id 
+	 */
+	private static final long serialVersionUID = 1L;	
+	/**
+	 * 此模块对应的表名 
+	 */
+	public static final String TABLE_NAME = "tb_disinfect";	
+	/**
+	 * 此模块对应的权限码 
+	 */
+	public static final String PERMISSION_CODE = "tb-disinfect";	
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 * 主键 
+	 */
+	private String id;
+
+	/**
+	 * 发货人 
+	 */
+	private String sendPeople;	
+
+	/**
+	 * 收货人 
+	 */
+	private String receivePeople;	
+
+	/**
+	 * 品名 
+	 */
+	private String goodsName;	
+
+	/**
+	 * 产地 
+	 */
+	private String origin;	
+
+	/**
+	 * 数量 
+	 */
+	private Integer num;	
+
+	/**
+	 * 重量 
+	 */
+	private Double grossWeight;	
+
+	/**
+	 * 规格 
+	 */
+	private Double unit;	
+
+	/**
+	 * 包装 
+	 */
+	private String pack;	
+
+	/**
+	 * 标记 
+	 */
+	private String flag;	
+
+	/**
+	 * 号码 
+	 */
+	private String phone;	
+
+	/**
+	 * 启运地 
+	 */
+	private String sourceAddress;	
+
+	/**
+	 * 到达口岸 
+	 */
+	private String arrivePart;	
+
+	/**
+	 * 运输工具 
+	 */
+	private String carName;	
+
+	/**
+	 * 运输工具号码 
+	 */
+	private String carNo;	
+
+	/**
+	 * 中国运输工具 
+	 */
+	private String chinaCarName;	
+
+	/**
+	 * 中国运输号码 
+	 */
+	private String chinaCarNo;	
+
+	/**
+	 * 备注 
+	 */
+	private String remark;	
+
+	/**
+	 * 申请单位 
+	 */
+	private String applyUnit;	
+
+	/**
+	 * 申请人 
+	 */
+	private String applyPeople;	
+
+	/**
+	 * 申请人联系号码 
+	 */
+	private String applyPhone;	
+
+	/**
+	 * 申请时间 
+	 */
+	private Date applyTime;
+
+	/**
+	 * 受理人 
+	 */
+	private String acceptPeople;	
+
+	/**
+	 * 受理时间 
+	 */
+	private Date acceptTime;
+
+	/**
+	 * 计费(分) 
+	 */
+	private BigDecimal money;
+
+
+
+
+
+	
+
+
+}

+ 104 - 0
sp-server/src/main/java/com/pj/project/tb_disinfect/TbDisinfectController.java

@@ -0,0 +1,104 @@
+package com.pj.project.tb_disinfect;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import com.pj.utils.sg.*;
+import com.pj.project4sp.SP;
+
+import com.pj.current.satoken.StpUserUtil;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+
+
+/**
+ * Controller: tb_disinfect -- 消毒申请单
+ * @author qzy 
+ */
+@RestController
+@RequestMapping("/TbDisinfect/")
+public class TbDisinfectController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbDisinfectService tbDisinfectService;
+
+	/** 增 */  
+	@RequestMapping("add")
+	@SaCheckPermission(TbDisinfect.PERMISSION_CODE)
+	@Transactional(rollbackFor = Exception.class)
+	public AjaxJson add(TbDisinfect t){
+		tbDisinfectService.add(t);
+		t = tbDisinfectService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 删 */  
+	@RequestMapping("delete")
+	@SaCheckPermission(TbDisinfect.PERMISSION_CODE)
+	public AjaxJson delete(Long id){
+		int line = tbDisinfectService.delete(id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 删 - 根据id列表 */  
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(TbDisinfect.PERMISSION_CODE)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class); 
+		int line = SP.publicMapper.deleteByIds(TbDisinfect.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 */  
+	@RequestMapping("update")
+	@SaCheckPermission(TbDisinfect.PERMISSION_CODE)
+	public AjaxJson update(TbDisinfect t){
+		int line = tbDisinfectService.update(t);
+		return AjaxJson.getByLine(line);
+	}
+
+	/** 查 - 根据id */  
+	@RequestMapping("getById")
+	public AjaxJson getById(Long id){
+		TbDisinfect t = tbDisinfectService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	@RequestMapping("getList")
+	public AjaxJson getList() { 
+		SoMap so = SoMap.getRequestSoMap();
+		List<TbDisinfect> list = tbDisinfectService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+	
+	
+	
+	
+	// ------------------------- 前端接口 -------------------------
+	
+	
+	/** 改 - 不传不改 [G] */
+	@RequestMapping("updateByNotNull")
+	public AjaxJson updateByNotNull(Long id){
+		AjaxError.throwBy(true, "如需正常调用此接口,请删除此行代码");
+		// 鉴别身份,是否为数据创建者 
+		long userId = SP.publicMapper.getColumnByIdToLong(TbDisinfect.TABLE_NAME, "user_id", id);
+		AjaxError.throwBy(userId != StpUserUtil.getLoginIdAsLong(), "此数据您无权限修改");
+		// 开始修改 (请只保留需要修改的字段)
+		SoMap so = SoMap.getRequestSoMap();
+		so.clearNotIn("id", "sendPeople", "receivePeople", "goodsName", "origin", "num", "grossWeight", "unit", "pack", "flag", "phone", "sourceAddress", "arrivePart", "carName", "carNo", "chinaCarName", "chinaCarNo", "remark", "applyUnit", "applyPeople", "applyPhone", "applyTime", "acceptPeople", "acceptTime", "money").clearNull().humpToLineCase();	
+		int line = SP.publicMapper.updateBySoMapById(TbDisinfect.TABLE_NAME, so, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	
+	
+	
+	
+	
+
+}

+ 56 - 0
sp-server/src/main/java/com/pj/project/tb_disinfect/TbDisinfectMapper.java

@@ -0,0 +1,56 @@
+package com.pj.project.tb_disinfect;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.pj.utils.so.*;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * Mapper: tb_disinfect -- 消毒申请单
+ * @author qzy 
+ */
+
+@Mapper
+@Repository
+public interface TbDisinfectMapper extends BaseMapper <TbDisinfect> {
+
+	/**
+	 * 增  
+	 * @param t 实体对象 
+	 * @return 受影响行数 
+	 */
+	int add(TbDisinfect t);
+
+	/**
+	 * 删  
+	 * @param id 要删除的数据id  
+	 * @return 受影响行数 
+	 */
+	int delete(Long id);	 
+
+	/** 
+	 * 改  
+	 * @param t 实体对象 
+	 * @return 受影响行数 
+	 */
+	int update(TbDisinfect t);
+
+	/** 
+	 * 查 - 根据id  
+	 * @param id 要查询的数据id 
+	 * @return 实体对象 
+	 */
+	TbDisinfect getById(Long id);	 
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合 
+	 * @return 数据列表 
+	 */
+	List<TbDisinfect> getList(SoMap so);
+
+
+}

+ 164 - 0
sp-server/src/main/java/com/pj/project/tb_disinfect/TbDisinfectMapper.xml

@@ -0,0 +1,164 @@
+<?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.pj.project.tb_disinfect.TbDisinfectMapper">
+
+	<!-- 增 [G] -->
+	<insert id="add">
+		insert into 
+		tb_disinfect (id, send_people, receive_people, goods_name, origin, num, gross_weight, unit, pack, flag, phone, source_address, arrive_part, car_name, car_no, china_car_name, china_car_no, remark, apply_unit, apply_people, apply_phone, apply_time, accept_people, accept_time, money) 
+		values (#{id}, #{sendPeople}, #{receivePeople}, #{goodsName}, #{origin}, #{num}, #{grossWeight}, #{unit}, #{pack}, #{flag}, #{phone}, #{sourceAddress}, #{arrivePart}, #{carName}, #{carNo}, #{chinaCarName}, #{chinaCarNo}, #{remark}, #{applyUnit}, #{applyPeople}, #{applyPhone}, #{applyTime}, #{acceptPeople}, #{acceptTime}, #{money}) 
+	</insert>
+
+	<!-- 删 -->
+	<delete id="delete">
+		delete from tb_disinfect 
+		where id = #{id}
+	</delete>
+
+	<!-- 改 [G] -->
+	<update id="update">
+		update tb_disinfect set
+		id = #{id}, 
+		send_people = #{sendPeople}, 
+		receive_people = #{receivePeople}, 
+		goods_name = #{goodsName}, 
+		origin = #{origin}, 
+		num = #{num}, 
+		gross_weight = #{grossWeight}, 
+		unit = #{unit}, 
+		pack = #{pack}, 
+		flag = #{flag}, 
+		phone = #{phone}, 
+		source_address = #{sourceAddress}, 
+		arrive_part = #{arrivePart}, 
+		car_name = #{carName}, 
+		car_no = #{carNo}, 
+		china_car_name = #{chinaCarName}, 
+		china_car_no = #{chinaCarNo}, 
+		remark = #{remark}, 
+		apply_unit = #{applyUnit}, 
+		apply_people = #{applyPeople}, 
+		apply_phone = #{applyPhone}, 
+		apply_time = #{applyTime}, 
+		accept_people = #{acceptPeople}, 
+		accept_time = #{acceptTime}, 
+		money = #{money}
+		where id = #{id}
+	</update>
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, send_people, receive_people, goods_name, origin, num, gross_weight, unit, pack, flag, phone, source_address, arrive_part, car_name, car_no, china_car_name, china_car_no, remark, apply_unit, apply_people, apply_phone, apply_time, accept_people, accept_time, money from tb_disinfect  -->
+	
+	<!-- 通用映射:手动模式 -->
+	<resultMap id="model" type="com.pj.project.tb_disinfect.TbDisinfect">
+		<result property="id" column="id" />
+		<result property="sendPeople" column="send_people" />
+		<result property="receivePeople" column="receive_people" />
+		<result property="goodsName" column="goods_name" />
+		<result property="origin" column="origin" />
+		<result property="num" column="num" />
+		<result property="grossWeight" column="gross_weight" />
+		<result property="unit" column="unit" />
+		<result property="pack" column="pack" />
+		<result property="flag" column="flag" />
+		<result property="phone" column="phone" />
+		<result property="sourceAddress" column="source_address" />
+		<result property="arrivePart" column="arrive_part" />
+		<result property="carName" column="car_name" />
+		<result property="carNo" column="car_no" />
+		<result property="chinaCarName" column="china_car_name" />
+		<result property="chinaCarNo" column="china_car_no" />
+		<result property="remark" column="remark" />
+		<result property="applyUnit" column="apply_unit" />
+		<result property="applyPeople" column="apply_people" />
+		<result property="applyPhone" column="apply_phone" />
+		<result property="applyTime" column="apply_time" />
+		<result property="acceptPeople" column="accept_people" />
+		<result property="acceptTime" column="accept_time" />
+		<result property="money" column="money" />
+	</resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from tb_disinfect 
+	</sql>
+	
+	<!-- 查 - 根据id -->
+	<select id="getById" resultMap="model">
+		<include refid="select_sql"></include>
+		where id = #{id}
+	</select>
+	
+	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
+	<select id="getList" resultMap="model">
+		<include refid="select_sql"></include>
+		<where>
+			<if test=' this.has("id") '> and id = #{id} </if>
+			<if test=' this.has("sendPeople") '> and send_people = #{sendPeople} </if>
+			<if test=' this.has("receivePeople") '> and receive_people = #{receivePeople} </if>
+			<if test=' this.has("goodsName") '> and goods_name = #{goodsName} </if>
+			<if test=' this.has("origin") '> and origin = #{origin} </if>
+			<if test=' this.has("num") '> and num = #{num} </if>
+			<if test=' this.has("grossWeight") '> and gross_weight = #{grossWeight} </if>
+			<if test=' this.has("unit") '> and unit = #{unit} </if>
+			<if test=' this.has("pack") '> and pack = #{pack} </if>
+			<if test=' this.has("flag") '> and flag = #{flag} </if>
+			<if test=' this.has("phone") '> and phone = #{phone} </if>
+			<if test=' this.has("sourceAddress") '> and source_address = #{sourceAddress} </if>
+			<if test=' this.has("arrivePart") '> and arrive_part = #{arrivePart} </if>
+			<if test=' this.has("carName") '> and car_name = #{carName} </if>
+			<if test=' this.has("carNo") '> and car_no = #{carNo} </if>
+			<if test=' this.has("chinaCarName") '> and china_car_name = #{chinaCarName} </if>
+			<if test=' this.has("chinaCarNo") '> and china_car_no = #{chinaCarNo} </if>
+			<if test=' this.has("remark") '> and remark = #{remark} </if>
+			<if test=' this.has("applyUnit") '> and apply_unit = #{applyUnit} </if>
+			<if test=' this.has("applyPeople") '> and apply_people = #{applyPeople} </if>
+			<if test=' this.has("applyPhone") '> and apply_phone = #{applyPhone} </if>
+			<if test=' this.has("applyTime") '> and apply_time = #{applyTime} </if>
+			<if test=' this.has("acceptPeople") '> and accept_people = #{acceptPeople} </if>
+			<if test=' this.has("acceptTime") '> and accept_time = #{acceptTime} </if>
+			<if test=' this.has("money") '> and money = #{money} </if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> send_people desc </when>
+			<when test='sortType == 3'> receive_people desc </when>
+			<when test='sortType == 4'> goods_name desc </when>
+			<when test='sortType == 5'> origin desc </when>
+			<when test='sortType == 6'> num desc </when>
+			<when test='sortType == 7'> gross_weight desc </when>
+			<when test='sortType == 8'> unit desc </when>
+			<when test='sortType == 9'> pack desc </when>
+			<when test='sortType == 10'> flag desc </when>
+			<when test='sortType == 11'> phone desc </when>
+			<when test='sortType == 12'> source_address desc </when>
+			<when test='sortType == 13'> arrive_part desc </when>
+			<when test='sortType == 14'> car_name desc </when>
+			<when test='sortType == 15'> car_no desc </when>
+			<when test='sortType == 16'> china_car_name desc </when>
+			<when test='sortType == 17'> china_car_no desc </when>
+			<when test='sortType == 18'> remark desc </when>
+			<when test='sortType == 19'> apply_unit desc </when>
+			<when test='sortType == 20'> apply_people desc </when>
+			<when test='sortType == 21'> apply_phone desc </when>
+			<when test='sortType == 22'> apply_time desc </when>
+			<when test='sortType == 23'> accept_people desc </when>
+			<when test='sortType == 24'> accept_time desc </when>
+			<when test='sortType == 25'> money desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+</mapper>

+ 52 - 0
sp-server/src/main/java/com/pj/project/tb_disinfect/TbDisinfectService.java

@@ -0,0 +1,52 @@
+package com.pj.project.tb_disinfect;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.pj.project.tb_business.TbBusiness;
+import com.pj.project.tb_business.TbBusinessMapper;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.pj.utils.sg.*;
+
+/**
+ * Service: tb_disinfect -- 消毒申请单
+ * @author qzy 
+ */
+@Service
+public class TbDisinfectService extends ServiceImpl<TbDisinfectMapper, TbDisinfect> implements IService<TbDisinfect>  {
+
+	/** 底层 Mapper 对象 */
+	@Autowired
+	TbDisinfectMapper tbDisinfectMapper;
+
+	/** 增 */
+	int add(TbDisinfect t){
+		return tbDisinfectMapper.add(t);
+	}
+
+	/** 删 */
+	int delete(Long id){
+		return tbDisinfectMapper.delete(id);
+	}
+
+	/** 改 */
+	int update(TbDisinfect t){
+		return tbDisinfectMapper.update(t);
+	}
+
+	/** 查 */
+	TbDisinfect getById(Long id){
+		return tbDisinfectMapper.getById(id);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	List<TbDisinfect> getList(SoMap so) {
+		return tbDisinfectMapper.getList(so);	
+	}
+	
+
+}