Commit 59f91e8c authored by renchao's avatar renchao

送验单模块代码编写

parent 385f54d7
package cn.wise.sc.acquisition.business.controller;
import cn.wise.sc.acquisition.business.entity.TSampleList;
import cn.wise.sc.acquisition.business.model.query.TSampleListQuery;
import cn.wise.sc.acquisition.business.service.impl.TSampleListServiceImpl;
import cn.wise.sc.acquisition.business.wrapper.WrapMapper;
import cn.wise.sc.acquisition.business.wrapper.Wrapper;
import cn.wise.sc.acquisition.business.wrapper.page.Query;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.R;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
......@@ -17,5 +28,19 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/business/t-sample-list")
public class TSampleListController {
@Autowired
private TSampleListServiceImpl tSampleListService;
/**
* 根据条件查询送验单 分页
*
* @param tSampleListQuery
* @return
*/
@RequestMapping(value = "/listAllByQuery", method = RequestMethod.GET)
public R listAllByQuery(TSampleListQuery tSampleListQuery, Query query) {
return R.ok(tSampleListService.listAllByQuery(tSampleListQuery,query));
}
}
......@@ -3,6 +3,8 @@ package cn.wise.sc.acquisition.business.mapper;
import cn.wise.sc.acquisition.business.entity.TSampleList;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
/**
* <p>
* Mapper 接口
......
......@@ -2,4 +2,23 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.wise.sc.acquisition.business.mapper.TSampleListMapper">
<!-- 表和实体字段对照关系, 类似RestultMap -->
<sql id="TSampleListColumns">
a.Yh,
a.QRCode,
a.StopeName,
a.StepName,
a.BlastAreaName,
a.HolesID,
a.Start,
a.EndTo,
a.Syr,
a.Syrq,
a.Bz
</sql>
<sql id="TSampleListJoins">
</sql>
</mapper>
package cn.wise.sc.acquisition.business.model.query;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author renchao
* @since 2021-04-22
*/
@Data
@ApiModel("送样单")
public class TSampleListQuery implements Serializable {
/**
* 搜索字段
*/
@ApiModelProperty("搜索字段")
private String search;
/**
* 样号
*/
@ApiModelProperty("样号")
private String Yh;
/**
* 二维码
*/
@ApiModelProperty("二维码")
private byte[] QRCode;
/**
* 采区名称
*/
@ApiModelProperty("职务名称")
private String StopeName;
/**
* 平台名称
*/
@ApiModelProperty("平台名称")
private String StepName;
/**
* 爆区名称
*/
@ApiModelProperty("爆区名称")
private String BlastAreaName;
/**
* 炮孔编号
*/
@ApiModelProperty("炮孔编号")
private String HolesID;
/**
* 从
*/
@ApiModelProperty("从")
private String Start;
/**
* 至
*/
@ApiModelProperty("至")
private String EndTo;
/**
* 送样人
*/
@ApiModelProperty("送样人")
private String Syr;
/**
* 送样时间
*/
@ApiModelProperty("送样时间")
private LocalDateTime Syrq;
/**
* 备注
*/
@ApiModelProperty("备注")
private String Bz;
}
package cn.wise.sc.acquisition.business.service;
import cn.wise.sc.acquisition.business.entity.TSampleList;
import cn.wise.sc.acquisition.business.model.query.TSampleListQuery;
import cn.wise.sc.acquisition.business.wrapper.page.Query;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
......@@ -12,5 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @since 2021-04-22
*/
public interface ITSampleListService extends IService<TSampleList> {
R listAllByQuery(TSampleListQuery tSampleListQuery, Query query);
}
......@@ -2,10 +2,18 @@ package cn.wise.sc.acquisition.business.service.impl;
import cn.wise.sc.acquisition.business.entity.TSampleList;
import cn.wise.sc.acquisition.business.mapper.TSampleListMapper;
import cn.wise.sc.acquisition.business.model.query.TSampleListQuery;
import cn.wise.sc.acquisition.business.service.ITSampleListService;
import cn.wise.sc.acquisition.business.wrapper.page.Query;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 服务实现类
......@@ -17,4 +25,19 @@ import org.springframework.stereotype.Service;
@Service
public class TSampleListServiceImpl extends ServiceImpl<TSampleListMapper, TSampleList> implements ITSampleListService {
@Override
public R listAllByQuery(TSampleListQuery tSampleListQuery, Query query) {
//参数校验
//分页
Page<TSampleList> page = new Page<>(query.getPageNum(), query.getPageSize());
//条件封装
QueryWrapper<TSampleList> queryWrapper = new QueryWrapper<>();
queryWrapper.like(StringUtils.isNotBlank(tSampleListQuery.getSearch()), "Yh", tSampleListQuery.getSearch())
.or()
.like("HolesID", tSampleListQuery.getSearch());
//查询
Page<TSampleList> tSampleListPage = baseMapper.selectPage(page, queryWrapper);
return R.ok(tSampleListPage);
}
}
server:
port: 7008
#-Dspring.config.location=D:\idea_workspases\tianjin-acquisition\acquisition-business\src\main\resources\application.yml
spring:
application: data-acquisition
profiles:
active: dev
datasource:
# 192.168.110.85 fpsn
url: jdbc:sqlserver://192.168.110.85:1433;DatabaseName=fpsn
username: sa
password: admin!@#123
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
hikari:
minimum-idle: 3
maximum-pool-size: 10
max-lifetime: 30000 #不能小于30秒,否则默认回到1800秒
connection-test-query: SELECT 1
redis:
port: 6379
host: 192.168.110.85
database: 2
# password: Wise_@123456
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
# 设置swagger用户名密码
swagger:
basic:
enable: false
username: admin
password: admin
mybatis-plus:
# 启动时是否检查MyBatis XML文件是否存在
check-config-location: true
type-aliases-package: cn.wise.sc.acquisition.business.entity.**
mapper-locations: classpath:/cn/wise/sc/acquisition/business/mapper/xml/*Mapper.xml
<?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="cn.wise.sc.acquisition.business.mapper.TAnnouncementMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TEquipmentAccountMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TEquipmentCheckMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TEquipmentMaintenanceCycleMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TEquipmentMaintenanceMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TEquipmentRepairMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TEquipmentRunMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TEquipmentTroubleMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TEquipmentUsagefeeMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TMaterialEntryMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TMaterialOutMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TMineBasicMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TMineRightMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TMineScopeMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TMineStopeMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TPlanMonthMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TPlanYearMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TProcessesAuxiliaryMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TProcessesBlastMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TProcessesBlastdesignHoleMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TProcessesBlastdesignVolumeMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TProcessesCrusherMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TProcessesDiggingMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TProcessesDrillingMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TProcessesTruckMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TSafeTroubleImgMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TSafeTroubleMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TSampleLaboratorysheetMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TSampleListMapper">
<!-- 表和实体字段对照关系, 类似RestultMap -->
<sql id="TSampleListColumns">
a.Yh,
a.QRCode,
a.StopeName,
a.StepName,
a.BlastAreaName,
a.HolesID,
a.Start,
a.EndTo,
a.Syr,
a.Syrq,
a.Bz
</sql>
<sql id="TSampleListJoins">
</sql>
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TSysDeptMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TSysDictMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TSysPowerMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TSysRoleMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TSysRolepowerMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TSysUserLoginMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TSysUserMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TWagesMapper">
</mapper>
<?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="cn.wise.sc.acquisition.business.mapper.TWeightMapper">
</mapper>
fastdfs.connect_timeout=2000
fastdfs.network_timeout=1501
fastdfs.charset=UTF-8
fastdfs.http.tracker_http_port=8888
fastdfs.http.anti_steal_token=no
fastdfs.http.secret_key=FastDFS1234567890
fastdfs.tracker_servers=localhost:22122
<License>
<Data>
<Products>
<Product>Aspose.Total for Java</Product>
<Product>Aspose.Words for Java</Product>
</Products>
<EditionType>Enterprise</EditionType>
<SubscriptionExpiry>20991231</SubscriptionExpiry>
<LicenseExpiry>20991231</LicenseExpiry>
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
</Data>
<Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>
</License>
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment