Commit ab3363cb authored by 竹天卫's avatar 竹天卫

委托优化

parent a38e06d8
......@@ -53,13 +53,14 @@ public class EntrustController {
"7校核中,8校核完成)", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "clientId", value = "委托单位id", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "projectName", value = "项目名称", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "projectCode", value = "项目编号", paramType = "query", dataType = "String")
@ApiImplicitParam(name = "projectCode", value = "项目编号", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "isUrgent", value = "(1加急,0不加急)", paramType = "query", dataType = "Integer")
})
@GetMapping("/getPage")
public BaseResponse getPage(PageQuery pageQuery, String startDate, String endDate, Integer status,
Integer clientId, String projectName, String projectCode) {
Integer clientId, String projectName, String projectCode, Integer isUrgent) {
try {
return entrustService.getPage(pageQuery, startDate, endDate, status, clientId, projectName, projectCode);
return entrustService.getPage(pageQuery, startDate, endDate, status, clientId, projectName, projectCode, isUrgent);
} catch (Exception e) {
log.debug("委托分页列表{}", e);
}
......
......@@ -29,6 +29,9 @@
<if test="params.projectType != null and params.projectType != ''">
and e.project_type = #{params.projectType}
</if>
<if test="params.isUrgent != null">
and e.is_urgent = #{params.isUrgent}
</if>
</where>
</sql>
......
......@@ -29,7 +29,7 @@ import java.util.Map;
public interface IEntrustService extends IService<Entrust> {
BaseResponse<IPage<EntrustVo>> getPage(PageQuery pageQuery, String startDate, String endDate, Integer status,
Integer clientId, String projectName, String projectCode);
Integer clientId, String projectName, String projectCode, Integer isUrgent);
BaseResponse<String> setTopping(Integer id);
......
......@@ -124,7 +124,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
*/
@Override
public BaseResponse<IPage<EntrustVo>> getPage(PageQuery pageQuery, String startDate, String endDate, Integer status,
Integer clientId, String projectName, String projectCode) {
Integer clientId, String projectName, String projectCode, Integer isUrgent) {
LoginUser loginUser = userService.getLoginUser();
if (loginUser == null) {
return BaseResponse.errorMsg("请登录账号");
......@@ -136,6 +136,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
params.put("clientId", clientId);
params.put("projectName", projectName);
params.put("projectCode", projectCode);
params.put("isUrgent", isUrgent);
Integer approvalId = sysApprovalMapper.getApprovalId("委托评审");
if (approvalId == null) {
return BaseResponse.errorMsg("委托评审信息错误");
......
......@@ -49,7 +49,7 @@ public class WeiXinService {
System.out.println("==================code===================");
System.out.println(code);
try {
/*String accessToken = null;
String accessToken = null;
if(type.equals("PC")){
accessToken = getAccessToken();
}else if(type.equals("APP")){
......@@ -66,10 +66,10 @@ public class WeiXinService {
String UserId = jsonObject.getString("UserId");
System.out.println("==================UserId===================");
System.out.println(UserId);
JSONObject userJson = getUser(accessToken, UserId);*/
JSONObject userJson = getUser(accessToken, UserId);
QueryWrapper<SysUser> wrapper = new QueryWrapper<>();
// wrapper.eq("phone", userJson.get("mobile"));
wrapper.eq("phone", code); //暂时用手机号代替code
wrapper.eq("phone", userJson.get("mobile"));
// wrapper.eq("phone", code); //暂时用手机号代替code
SysUser sysUser = userService.getOne(wrapper);
if(sysUser == null){
return BaseResponse.errorMsg("非系统用户不允许登录!");
......
......@@ -8,8 +8,8 @@ spring:
active: dev
datasource:
# 192.168.110.85 admin!@#123
url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://81.68.92.175:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://81.68.92.175:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: admin!@#123
driverClassName: com.mysql.cj.jdbc.Driver
......
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