Commit ebb692ae by huangtao

修复权限、签名问题

parent 9e467ffa
...@@ -23,7 +23,7 @@ public class BillDTO { ...@@ -23,7 +23,7 @@ public class BillDTO {
@ApiModelProperty(value = "数量") @ApiModelProperty(value = "数量")
private Integer physicNum; private Integer physicNum;
@ApiModelProperty(value = "1-入库 2-申请") @ApiModelProperty(value = "1-收取 2-支出")
private Integer type; private Integer type;
@ApiModelProperty(value = "厂家名称") @ApiModelProperty(value = "厂家名称")
......
...@@ -15,9 +15,9 @@ import java.util.List; ...@@ -15,9 +15,9 @@ import java.util.List;
@Mapper @Mapper
public interface PhysicBillMapper extends BaseMapper<PhysicBill> { public interface PhysicBillMapper extends BaseMapper<PhysicBill> {
Integer selectSumByBatchNo(@Param("name") String name,@Param("spec") String spec,@Param("factoryName") String factoryName,@Param("batchNo") String batchNo ); Integer selectSumByBatchNo(@Param("name") String name,@Param("spec") String spec,@Param("factoryName") String factoryName,@Param("batchNo") String batchNo,@Param("deptId") Long deptId );
Integer selectSumByName(@Param("name") String name,@Param("spec") String spec,@Param("factoryName") String factoryName); Integer selectSumByName(@Param("name") String name,@Param("spec") String spec,@Param("factoryName") String factoryName,@Param("deptId")Long deptId);
List<BillInfoVO> selectByGroup(@Param("physicName") String physicName); List<BillInfoVO> selectByGroup(@Param("physicName") String physicName);
......
...@@ -128,13 +128,20 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp ...@@ -128,13 +128,20 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp
} }
if(!CollectionUtils.isEmpty(fy_statusList)){ if(!CollectionUtils.isEmpty(fy_statusList)){
queryWrapper.and(o->{ if(CollectionUtils.isEmpty(ly_statusList)){
o.eq(PhysicApply::getFyDeptId,deptId).in(PhysicApply::getStatus,fy_statusList); queryWrapper.and(o->{
}); o.eq(PhysicApply::getFyDeptId,deptId).in(PhysicApply::getStatus,fy_statusList);
});
}else{
queryWrapper.or(o->{
o.eq(PhysicApply::getFyDeptId,deptId).in(PhysicApply::getStatus,fy_statusList);
});
}
} }
if(!CollectionUtils.isEmpty(ly_statusList) || !CollectionUtils.isEmpty(fy_statusList)){ if(!CollectionUtils.isEmpty(ly_statusList) || !CollectionUtils.isEmpty(fy_statusList)){
physicApplyMapper.selectList(queryWrapper); physicApplyList= physicApplyMapper.selectList(queryWrapper);
} }
...@@ -192,10 +199,17 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp ...@@ -192,10 +199,17 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp
if(f){ if(f){
BillDTO billDTO = new BillDTO(); BillDTO billDTO = new BillDTO();
BeanUtil.copyProperties(physicApply,billDTO); BeanUtil.copyProperties(physicApply,billDTO);
billDTO.setType(2); billDTO.setType(1);
billDTO.setPhysicNum(physicApply.getActualNum()); billDTO.setPhysicNum(physicApply.getActualNum());
billDTO.setDeptId(physicApply.getLyDeptId()); billDTO.setDeptId(physicApply.getLyDeptId());
physicBillService.createBill(billDTO); physicBillService.createBill(billDTO);
BillDTO billDTO2 = new BillDTO();
BeanUtil.copyProperties(physicApply,billDTO);
billDTO2.setType(2);
billDTO2.setPhysicNum(physicApply.getActualNum());
billDTO2.setDeptId(physicApply.getFyDeptId());
physicBillService.createBill(billDTO);
} }
return getInfo(physicApplySignReq.getPhysicApplyId()); return getInfo(physicApplySignReq.getPhysicApplyId());
} }
......
...@@ -39,18 +39,21 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill ...@@ -39,18 +39,21 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill
PhysicBill bill = new PhysicBill(); PhysicBill bill = new PhysicBill();
BeanUtil.copyProperties(billDTO,bill); BeanUtil.copyProperties(billDTO,bill);
bill.setType(billDTO.getType()); bill.setType(billDTO.getType());
Integer batchNoSum = physicBillMapper.selectSumByBatchNo(billDTO.getPhysicName(), billDTO.getPhysicSpec(), billDTO.getFactoryName(), billDTO.getBatchNo(),billDTO.getDeptId());
Integer sum = physicBillMapper.selectSumByName(billDTO.getPhysicName(), billDTO.getPhysicSpec(), billDTO.getFactoryName(),billDTO.getDeptId());
if(billDTO.getType()==1){ if(billDTO.getType()==1){
bill.setAcquireNum(billDTO.getPhysicNum()); bill.setAcquireNum(billDTO.getPhysicNum());
bill.setBalance(batchNoSum+billDTO.getPhysicNum());
bill.setBalanceAll(sum+billDTO.getPhysicNum());
}else if(billDTO.getType()==2){ }else if(billDTO.getType()==2){
bill.setExpendNum(billDTO.getPhysicNum()); bill.setExpendNum(billDTO.getPhysicNum());
bill.setBalance(batchNoSum-billDTO.getPhysicNum());
bill.setBalanceAll(sum-billDTO.getPhysicNum());
} }
bill.setStatus(0);
Integer batchNoSum = physicBillMapper.selectSumByBatchNo(billDTO.getPhysicName(), billDTO.getPhysicSpec(), billDTO.getFactoryName(), billDTO.getBatchNo());
Integer sum = physicBillMapper.selectSumByName(billDTO.getPhysicName(), billDTO.getPhysicSpec(), billDTO.getFactoryName());
bill.setStatus(0);
bill.setBalance(batchNoSum+billDTO.getPhysicNum());
bill.setBalanceAll(sum+billDTO.getPhysicNum());
physicBillMapper.insert(bill); physicBillMapper.insert(bill);
} }
......
...@@ -104,7 +104,7 @@ public class PhysicWarehouseServiceImpl extends AbstractService implements Phys ...@@ -104,7 +104,7 @@ public class PhysicWarehouseServiceImpl extends AbstractService implements Phys
physicWarehouse.setStatus(3); physicWarehouse.setStatus(3);
SignInfoDTO signInfoDTO = new SignInfoDTO(getstamp, LocalDateTime.now(),userId);; SignInfoDTO signInfoDTO = new SignInfoDTO(getstamp, LocalDateTime.now(),userId);;
physicWarehouse.setBgUser(JSONUtil.toJsonStr(signInfoDTO)); physicWarehouse.setBgUser(JSONUtil.toJsonStr(signInfoDTO));
f = true;
} }
if(f){ if(f){
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
</select> </select>
<select id="selectSumByName" resultType="java.lang.Integer"> <select id="selectSumByName" resultType="java.lang.Integer">
select (IFNULL(sum(expend_num),0) - IFNULL(sum(acquire_num),0)) from physic_bill where physic_name=#{name} and physic_spec=#{spec} and factory_name =#{factoryName} select (IFNULL(sum(expend_num),0) - IFNULL(sum(acquire_num),0)) from physic_bill where physic_name=#{name} and physic_spec=#{spec} and factory_name =#{factoryName} and dept_id =#{deptId}
</select> </select>
<select id="selectByGroup" resultType="com.jmai.physic.vo.BillInfoVO"> <select id="selectByGroup" resultType="com.jmai.physic.vo.BillInfoVO">
select physic_name,physic_spec,factory_name from physic_bill where physic_name =#{physicName} group by physic_name,physic_spec,factory_name select physic_name,physic_spec,factory_name from physic_bill where physic_name LIKE CONCAT('%', #{physicName}, '%') group by physic_name,physic_spec,factory_name,dept_id
</select> </select>
<select id="selectBillPage" resultType="com.jmai.physic.vo.BillQueryVO"> <select id="selectBillPage" resultType="com.jmai.physic.vo.BillQueryVO">
select *,b.dept_name from physic_bill a left join sys_dept b on a.dept_id =b.id where a.physic_name =#{req.physicName} and select *,b.dept_name from physic_bill a left join sys_dept b on a.dept_id =b.id where a.physic_name =#{req.physicName} and
......
This diff could not be displayed because it is too large.
...@@ -792,3 +792,23 @@ ...@@ -792,3 +792,23 @@
1763322112818|112|statement|connection 0|select a.id as physicApplyId, a.*, (select dept_name from sys_dept d where d.id = a.ly_dept_id) as lyDeptName ,(select dept_name from sys_dept d where d.id = a.fy_dept_id) as fyDeptName from physic_apply a where a.del_flag =0 and a.status=? LIMIT ?|select a.id as physicApplyId, a.*, (select dept_name from sys_dept d where d.id = a.ly_dept_id) as lyDeptName ,(select dept_name from sys_dept d where d.id = a.fy_dept_id) as fyDeptName from physic_apply a where a.del_flag =0 and a.status=4 LIMIT 10 1763322112818|112|statement|connection 0|select a.id as physicApplyId, a.*, (select dept_name from sys_dept d where d.id = a.ly_dept_id) as lyDeptName ,(select dept_name from sys_dept d where d.id = a.fy_dept_id) as fyDeptName from physic_apply a where a.del_flag =0 and a.status=? LIMIT ?|select a.id as physicApplyId, a.*, (select dept_name from sys_dept d where d.id = a.ly_dept_id) as lyDeptName ,(select dept_name from sys_dept d where d.id = a.fy_dept_id) as fyDeptName from physic_apply a where a.del_flag =0 and a.status=4 LIMIT 10
1763322142491|37|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '896e930e-ae72-4430-90b2-958b3e36b703') 1763322142491|37|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '896e930e-ae72-4430-90b2-958b3e36b703')
1763322142529|36|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1965361747758530562 AND del_flag=0 1763322142529|36|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1965361747758530562 AND del_flag=0
1763372946577|44|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '58b817c5-f3de-45ce-82e1-ff19c06abc17')
1763372946638|37|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763372951157|37|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373051419|43|statement|connection 0|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = ? AND status IN (?,?)) AND (fy_dept_id = ? AND status IN (?,?)))|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = 2 AND status IN (0,1)) AND (fy_dept_id = 2 AND status IN (3,2)))
1763373181277|48|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '58b817c5-f3de-45ce-82e1-ff19c06abc17')
1763373181340|41|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373181424|40|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373186243|40|statement|connection 0|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = ? AND status IN (?,?)) AND (fy_dept_id = ? AND status IN (?,?)))|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = 2 AND status IN (0,1)) AND (fy_dept_id = 2 AND status IN (3,2)))
1763373225830|40|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '58b817c5-f3de-45ce-82e1-ff19c06abc17')
1763373225874|40|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373225921|40|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373245491|43|statement|connection 0|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = ? AND status IN (?,?)) AND (fy_dept_id = ? AND status IN (?,?)))|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = 2 AND status IN (0,1)) AND (fy_dept_id = 2 AND status IN (3,2)))
1763373396783|44|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '58b817c5-f3de-45ce-82e1-ff19c06abc17')
1763373396843|36|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373396923|34|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373401607|101|statement|connection 0|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = ? AND status IN (?,?)) OR (fy_dept_id = ? AND status IN (?,?)))|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = 2 AND status IN (0,1)) OR (fy_dept_id = 2 AND status IN (3,2)))
1763373448766|50|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '58b817c5-f3de-45ce-82e1-ff19c06abc17')
1763373448831|42|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373448914|40|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373453665|122|statement|connection 0|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = ? AND status IN (?,?)) OR (fy_dept_id = ? AND status IN (?,?)))|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = 2 AND status IN (0,1)) OR (fy_dept_id = 2 AND status IN (3,2)))
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 sign in to comment