Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx
This commit is contained in:
commit
924765b242
|
|
@ -13,12 +13,14 @@ import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购入库-app
|
* 新购入库-app
|
||||||
|
*
|
||||||
* @author bns_han
|
* @author bns_han
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|
@ -42,10 +44,10 @@ public class PurchaseInputController extends BaseController {
|
||||||
//判断该组织是否开启综合服务中心审核
|
//判断该组织是否开启综合服务中心审核
|
||||||
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
|
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
|
||||||
int re = purchaseInputService.selectExamineType(companyId);
|
int re = purchaseInputService.selectExamineType(companyId);
|
||||||
if (re>0){
|
if (re > 0) {
|
||||||
list = purchaseInputService.selectPutInListExamine(bean);
|
list = purchaseInputService.selectPutInListExamine(bean);
|
||||||
}else {
|
} else {
|
||||||
list =purchaseInputService.getList(bean);
|
list = purchaseInputService.getList(bean);
|
||||||
}
|
}
|
||||||
return success(list);
|
return success(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -58,10 +60,9 @@ public class PurchaseInputController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "新购入库清单明细")
|
@ApiOperation(value = "新购入库清单明细")
|
||||||
@GetMapping(value = "/putinDetails")
|
@GetMapping(value = "/putinDetails")
|
||||||
public AjaxResult putinDetails(PurchaseMacodeInfo purchaseMacodeInfo)
|
public AjaxResult putinDetails(PurchaseMacodeInfo purchaseMacodeInfo) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
List<PurchaseMacodeInfo> list =purchaseInputService.selectPutinDetails(purchaseMacodeInfo);
|
List<PurchaseMacodeInfo> list = purchaseInputService.selectPutinDetails(purchaseMacodeInfo);
|
||||||
return success(list);
|
return success(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
||||||
if (StringHelper.isNotEmpty(typeIds)) {
|
if (StringHelper.isNotEmpty(typeIds)) {
|
||||||
String[] splitTypeIds = typeIds.split("@");
|
String[] splitTypeIds = typeIds.split("@");
|
||||||
//先删除,在去添加
|
//先删除,在去添加
|
||||||
warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
// warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
||||||
for (String typeId : splitTypeIds) {
|
for (String typeId : splitTypeIds) {
|
||||||
WarehouseKeeper beans = new WarehouseKeeper();
|
WarehouseKeeper beans = new WarehouseKeeper();
|
||||||
beans.setTypeIds(typeId);
|
beans.setTypeIds(typeId);
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SELECT mt.type_id as modelId ,mt.type_name as modelName,
|
SELECT mt.type_id as modelId ,mt.type_name as modelName,
|
||||||
mt2.type_name as typeName,
|
mt2.type_name as typeName,
|
||||||
mt4.type_name as kindName,
|
mt4.type_name as kindName,
|
||||||
su.user_id as userId, su.nick_name as userName
|
su.user_id as userId,
|
||||||
|
GROUP_CONCAT(su.nick_name) as userName
|
||||||
FROM ma_type mt
|
FROM ma_type mt
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||||
|
|
@ -36,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="typeName != null and typeName != ''">
|
<if test="typeName != null and typeName != ''">
|
||||||
AND mt2.type_name like concat('%', #{typeName}, '%')
|
AND mt2.type_name like concat('%', #{typeName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
GROUP BY mt.type_id
|
||||||
ORDER BY mt.type_id DESC
|
ORDER BY mt.type_id DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,18 @@ public class PurchaseMacodeInfo extends BaseEntity
|
||||||
@ApiModelProperty(value = "单位名称")
|
@ApiModelProperty(value = "单位名称")
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
|
public String getUserIds() {
|
||||||
|
return userIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserIds(String userIds) {
|
||||||
|
this.userIds = userIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 审核员用户id */
|
||||||
|
@ApiModelProperty(value = "审核员用户id")
|
||||||
|
private String userIds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类型管理方式
|
* 类型管理方式
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -352,41 +352,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectPutinDetails" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
|
<select id="selectPutinDetails" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
|
||||||
select pcd.production_time productionTime,
|
SELECT
|
||||||
|
pcd.production_time productionTime,
|
||||||
mt.type_name specificationType,
|
mt.type_name specificationType,
|
||||||
mt1.type_name typeName,
|
mt1.type_name typeName,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type AS manageType,
|
||||||
pmi.ma_code maCode,
|
pmi.ma_code maCode,
|
||||||
mm.assets_code assetsCode,
|
mm.assets_code assetsCode,
|
||||||
pmi.fix_code fixCode,
|
pmi.fix_code fixCode,
|
||||||
pcd.type_id typeId,
|
pcd.type_id typeId,
|
||||||
pcd.task_id taskId,
|
pcd.task_id taskId,
|
||||||
mt.code specsCode,
|
mt.CODE specsCode,
|
||||||
mt1.code typeCode,
|
mt1.CODE typeCode,
|
||||||
|
GROUP_CONCAT( mtk.user_id ) AS userIds,
|
||||||
CASE
|
CASE
|
||||||
WHEN pmi.ma_code is null THEN
|
WHEN pmi.ma_code IS NULL THEN
|
||||||
CASE
|
CASE
|
||||||
WHEN pcd.status = 4 THEN 1
|
|
||||||
WHEN pcd.status = 5 THEN 2
|
WHEN pcd.STATUS = 4 THEN
|
||||||
ELSE 0
|
1
|
||||||
END
|
WHEN pcd.STATUS = 5 THEN
|
||||||
ELSE pmi.status
|
2 ELSE 0
|
||||||
END AS status,
|
END ELSE pmi.STATUS
|
||||||
|
END AS STATUS,
|
||||||
mm.qr_code qrCode,
|
mm.qr_code qrCode,
|
||||||
mm.ma_id maId,
|
mm.ma_id maId,
|
||||||
if(pmi.ma_code is not null, 1, pcd.check_num) checkNum
|
IF( pmi.ma_code IS NOT NULL, 1, pcd.check_num ) checkNum
|
||||||
from purchase_check_details pcd
|
FROM
|
||||||
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
|
purchase_check_details pcd
|
||||||
left join ma_machine mm on pmi.ma_code = mm.ma_code
|
LEFT JOIN purchase_macode_info pmi ON pmi.task_id = pcd.task_id
|
||||||
left join ma_type mt on pcd.type_id = mt.type_id
|
AND pmi.type_id = pcd.type_id
|
||||||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
LEFT JOIN ma_machine mm ON pmi.ma_code = mm.ma_code
|
||||||
where pcd.task_id = #{taskId}
|
LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id
|
||||||
and pcd.`status`!=3 and pcd.`status`!=7
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
|
LEFT JOIN ma_type_keeper mtk ON mtk.type_id = pcd.type_id
|
||||||
|
WHERE
|
||||||
|
pcd.task_id = #{taskId}
|
||||||
|
AND pcd.`status` != 3
|
||||||
|
AND pcd.`status` != 7
|
||||||
<if test="dictName != null and dictName != ''">
|
<if test="dictName != null and dictName != ''">
|
||||||
and (mt.type_name like concat('%',#{dictName},'%') or
|
and (mt.type_name like concat('%',#{dictName},'%') or
|
||||||
mt1.type_name like concat('%',#{dictName},'%'))
|
mt1.type_name like concat('%',#{dictName},'%'))
|
||||||
</if>
|
</if>
|
||||||
order by status, pmi.id
|
GROUP BY
|
||||||
|
pcd.type_id
|
||||||
|
ORDER BY
|
||||||
|
STATUS,
|
||||||
|
pmi.id
|
||||||
</select>
|
</select>
|
||||||
<select id="selectMaCode" resultType="java.lang.Integer">
|
<select id="selectMaCode" resultType="java.lang.Integer">
|
||||||
select count(ma_id) from ma_machine where ma_code = #{maCode}
|
select count(ma_id) from ma_machine where ma_code = #{maCode}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue