wms成品部分修改37

master
mengjiao 11 months ago
parent 2587c244f1
commit f33f28d00e

@ -23,6 +23,8 @@ import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.utils.poi.ExcelUtil;
import com.op.common.core.web.page.TableDataInfo;
import static com.op.common.core.web.domain.AjaxResult.success;
/**
* Controller
*
@ -86,7 +88,28 @@ public class OdsProductEmbryoInventoryController extends BaseController {
public AjaxResult addOdsProductEmbryoInventory(@RequestBody OdsProductEmbryoInventory odsProductEmbryoInventory) {
return success(odsProductEmbryoInventoryService.addOdsProductEmbryoInventory(odsProductEmbryoInventory));
}
/**
*
* @param odsProductEmbryoInventoryCorrelationList
* @return
*/
@PostMapping("/AdjustInventoryList")
public AjaxResult AdjustInventoryList(@RequestBody List<OdsProductEmbryoInventoryCorrelation> odsProductEmbryoInventoryCorrelationList) {
String relust= odsProductEmbryoInventoryService.AdjustInventoryList(odsProductEmbryoInventoryCorrelationList);
return success(relust);
}
/**
*
* @param odsProductEmbryoInventory
* @return
*/
@PostMapping("/selectObtainTheAssociated")
public AjaxResult selectObtainTheAssociated(@RequestBody OdsProductEmbryoInventory odsProductEmbryoInventory) {
List<OdsProductEmbryoInventoryCorrelation> odsProductEmbryoInventoryCorrelationList= odsProductEmbryoInventoryService.selectObtainTheAssociated(odsProductEmbryoInventory);
return success(odsProductEmbryoInventoryCorrelationList);
}
/**
*
*/

@ -38,6 +38,15 @@ private static final long serialVersionUID=1L;
@Excel(name = "关联的盘点单号")
private String orderCode;
private String wlCode;
private String adjustmentAmount;
public String getAdjustmentAmount() {
return adjustmentAmount;
}
public void setAdjustmentAmount(String adjustmentAmount) {
this.adjustmentAmount = adjustmentAmount;
}
public String getWlCode() {
return wlCode;

@ -65,4 +65,6 @@ public interface OdsProductEmbryoInventoryMapper {
List<OdsProductEmbryoInventoryCorrelation> selectOdsProductEmbryoInventoryCorrelationList(OdsProductEmbryoInventory odsProductEmbryoInventory2);
public int updateOdsProductEmbryoInventoryCorrelation(OdsProductEmbryoInventory odsProductEmbryoInventory1);
public int updateOdsProductEmbryoInventoryByOrderCode(OdsProductEmbryoInventory odsProductEmbryoInventory1);
}

@ -73,4 +73,8 @@ public interface IOdsProductEmbryoInventoryService {
String confirmCompletion(OdsProductEmbryoInventory odsProductEmbryoInventory);
List<OdsProductEmbryoInventoryCorrelation> selectOdsProductEmbryoInventoryCorrelation(OdsProductEmbryoInventory odsProductEmbryoInventory);
List<OdsProductEmbryoInventoryCorrelation> selectObtainTheAssociated(OdsProductEmbryoInventory odsProductEmbryoInventory);
String AdjustInventoryList(List<OdsProductEmbryoInventoryCorrelation> odsProductEmbryoInventoryCorrelationList);
}

@ -267,6 +267,45 @@ public class OdsProductEmbryoInventoryServiceImpl implements IOdsProductEmbryoIn
return odsProductEmbryoInventoryCorrelationList;
}
@Override
@DS("#header.poolName")
public List<OdsProductEmbryoInventoryCorrelation> selectObtainTheAssociated(OdsProductEmbryoInventory odsProductEmbryoInventory) {
// DynamicDataSourceContextHolder.push("ds_" + odsProductEmbryoInventory.getSiteCode());
OdsProductEmbryoInventory odsProductEmbryoInventory1=new OdsProductEmbryoInventory();
// odsProductEmbryoInventory1.setOrderStatus("1");
odsProductEmbryoInventory1.setOrderCode(odsProductEmbryoInventory.getOrderCode());
odsProductEmbryoInventory1.setActive("1");
List<OdsProductEmbryoInventoryCorrelation> odsProductEmbryoInventoryCorrelationList= odsProductEmbryoInventoryMapper.selectOdsProductEmbryoInventoryCorrelationList(odsProductEmbryoInventory1);
return odsProductEmbryoInventoryCorrelationList;
}
@Override
@DS("#header.poolName")
public String AdjustInventoryList(List<OdsProductEmbryoInventoryCorrelation> odsProductEmbryoInventoryCorrelationList) {
String result="调整成功";
OdsProductEmbryoInventory odsProductEmbryoInventory1=new OdsProductEmbryoInventory();
//修改为调整|
OdsProductEmbryoInventoryCorrelation odsProductEmbryoInventoryCorrelation= odsProductEmbryoInventoryCorrelationList.get(0);
odsProductEmbryoInventory1.setOrderCode(odsProductEmbryoInventoryCorrelation.getOrderCode());
odsProductEmbryoInventory1.setOrderStatus("4");//4是待审核
odsProductEmbryoInventory1.setUserDefined6(SecurityUtils.getUsername());
odsProductEmbryoInventory1.setUserDefined7(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
odsProductEmbryoInventory1.setLastUpdateDate(new Date());
odsProductEmbryoInventory1.setLastUpdateBy(SecurityUtils.getUsername());
odsProductEmbryoInventoryMapper.updateOdsProductEmbryoInventoryByOrderCode(odsProductEmbryoInventory1);
//插入调整数量
for (OdsProductEmbryoInventoryCorrelation odsProductEmbryoInventoryCorrelation1:odsProductEmbryoInventoryCorrelationList){
OdsProductEmbryoInventory odsProductEmbryoInventory11=new OdsProductEmbryoInventory();
odsProductEmbryoInventory11.setID(odsProductEmbryoInventoryCorrelation1.getID());
odsProductEmbryoInventory11.setUserDefined4(odsProductEmbryoInventoryCorrelation1.getAdjustmentAmount());
odsProductEmbryoInventory11.setLastUpdateDate(new Date());
odsProductEmbryoInventory11.setLastUpdateBy(SecurityUtils.getUsername());
odsProductEmbryoInventoryMapper.updateOdsProductEmbryoInventoryCorrelation(odsProductEmbryoInventory11);
}
return result;
}
@DS("#header.poolName")
private String getPurcode(String factorycode, String orderType) {

@ -748,4 +748,99 @@
</trim>
where ID = #{ID}
</update>
<update id="updateOdsProductEmbryoInventoryByOrderCode" parameterType="OdsProductEmbryoInventory">
update ods_product_embryo_inventory
<trim prefix="SET" suffixOverrides=",">
<if test="siteCode != null">Site_code =
#{siteCode},
</if>
<if test="orderCode != null">Order_Code =
#{orderCode},
</if>
<if test="materialCode != null">Material_Code =
#{materialCode},
</if>
<if test="materialDesc != null">Material_Desc =
#{materialDesc},
</if>
<if test="planDate != null">Plan_Date =
#{planDate},
</if>
<if test="locNumber != null">Loc_Number =
#{locNumber},
</if>
<if test="Unit != null">Unit =
#{Unit},
</if>
<if test="realityNumber != null">Reality_Number =
#{realityNumber},
</if>
<if test="orderStatus != null">Order_Status =
#{orderStatus},
</if>
<if test="userDefined1 != null">User_Defined1 =
#{userDefined1},
</if>
<if test="locCode != null">Loc_Code =
#{locCode},
</if>
<if test="userDefined2 != null">User_Defined2 =
#{userDefined2},
</if>
<if test="userDefined3 != null">User_Defined3 =
#{userDefined3},
</if>
<if test="userDefined4 != null">User_Defined4 =
#{userDefined4},
</if>
<if test="userDefined5 != null">User_Defined5 =
#{userDefined5},
</if>
<if test="userDefined6 != null">User_Defined6 =
#{userDefined6},
</if>
<if test="userDefined7 != null">User_Defined7 =
#{userDefined7},
</if>
<if test="userDefined8 != null">User_Defined8 =
#{userDefined8},
</if>
<if test="userDefined9 != null">User_Defined9 =
#{userDefined9},
</if>
<if test="userDefined10 != null">User_Defined10 =
#{userDefined10},
</if>
<if test="userDefined11 != null">User_Defined11 =
#{userDefined11},
</if>
<if test="Remark != null">Remark =
#{Remark},
</if>
<if test="createBy != null">Create_By =
#{createBy},
</if>
<if test="createDate != null">Create_Date =
#{createDate},
</if>
<if test="lastUpdateBy != null">Last_Update_By =
#{lastUpdateBy},
</if>
<if test="lastUpdateDate != null">Last_Update_Date =
#{lastUpdateDate},
</if>
<if test="Active != null">Active =
#{Active},
</if>
<if test="enterpriseId != null">Enterprise_Id =
#{enterpriseId},
</if>
<if test="enterpriseCode != null">Enterprise_Code =
#{enterpriseCode},
</if>
</trim>
where Order_Code = #{orderCode}
</update>
</mapper>

Loading…
Cancel
Save